Skip to content

fix(ui): remember folded inbox subtasks - #11069

Open
cryppadotta wants to merge 1 commit into
masterfrom
fix/remember-folded-inbox-subtasks
Open

fix(ui): remember folded inbox subtasks#11069
cryppadotta wants to merge 1 commit into
masterfrom
fix/remember-folded-inbox-subtasks

Conversation

@cryppadotta

@cryppadotta cryppadotta commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Thinking Path

  • Paperclip is the open source app people use to manage AI agents for work
  • The inbox helps operators scan parent tasks and their sub-tasks
  • Operators can fold a parent task to hide its sub-tasks
  • The inbox previously forgot that fold state after a page refresh
  • This pull request stores the fold state for each company and restores it when the inbox loads
  • The benefit is that the inbox keeps the operator's chosen task layout across page refreshes

Linked Issues or Issue Description

What happened?

The inbox reset every folded parent task after a page refresh. This made all nested sub-tasks visible again.

Expected behavior

The inbox must keep each folded or unfolded parent state after a page refresh. The state must remain separate for each company.

Steps to reproduce

  1. Open the inbox with parent and child tasks.
  2. Fold one parent task.
  3. Refresh the page.
  4. Observe that the child task is visible again without this fix.

Paperclip version or commit

Current master before this pull request.

Deployment mode

Local dev and built-from-source deployments.

What Changed

  • Added company-scoped local storage helpers for collapsed inbox parent IDs.
  • Restored the stored parent fold state when the inbox mounts or the selected company changes.
  • Saved both direct toggle changes and explicit collapse changes.
  • Added helper tests and an inbox remount regression test for both folded and unfolded states.

Verification

  • pnpm exec vitest run ui/src/lib/inbox.test.ts ui/src/pages/Inbox.test.tsx — 77 tests passed.
  • pnpm check:token-gates — all gates passed.
  • pnpm --filter @paperclipai/ui typecheck — passed.
  • pnpm --filter @paperclipai/ui build — passed.
  • pnpm -r typecheck — passed.
  • pnpm build — passed.
  • pnpm test:run — 3,521 tests passed and four skipped. One unrelated server test on the current base fails because it reads heartbeat.scheduling_suppressed instead of issue_commented; the same test fails alone and this pull request changes only inbox UI files.

Risks

  • Low risk. The state is local to the browser and scoped by company ID.
  • Old parent IDs can remain in local storage after tasks are deleted, but they do not affect visible tasks.

For core feature work, check ROADMAP.md first and discuss it in #dev before opening the PR. Feature PRs that overlap with planned core work may need to be redirected — check the roadmap first. See CONTRIBUTING.md.

Model Used

  • OpenAI Codex, exact model ID gpt-5.6-sol, with reasoning, tool use, and code execution. The runtime does not expose its context-window size.

Checklist

  • I have included a thinking path that traces from project context to this change
  • I have specified the model used (with version and capability details)
  • I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work
  • I have searched GitHub for duplicate or related PRs and linked them above
  • I have either (a) linked existing issues with Fixes: # / Closes # / Refs # OR (b) described the issue in-PR following the relevant issue template
  • I have not referenced internal/instance-local Paperclip issues or links (only public GitHub #NNN / github.com/paperclipai/paperclip URLs)
  • My branch name describes the change (e.g. docs/..., fix/...) and contains no internal Paperclip ticket id or instance-derived details
  • I have run tests locally and they pass
  • I have added or updated tests where applicable
  • I have updated relevant documentation to reflect my changes
  • I have considered and documented any risks above
  • All Paperclip CI gates are green
  • Greptile is 5/5 with no open P2s, recommendations, or follow-ups
  • I will address all Greptile and reviewer comments before requesting merge

@greptile-apps

greptile-apps Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR persists inbox parent-fold state in company-scoped localStorage and restores it after remounts and company changes.

  • Adds load and save helpers for collapsed inbox parent IDs.
  • Connects pointer and keyboard collapse actions to persistence.
  • Adds helper tests and a remount regression test for folded and unfolded states.

Confidence Score: 5/5

The PR appears safe to merge because no actionable failure remains in the changed persistence flow.

The new state is keyed by company, restored when the selected company changes, updated through every current parent-collapse action, and protected against malformed or unavailable browser storage.

Important Files Changed

Filename Overview
ui/src/lib/inbox.ts Adds guarded, company-scoped serialization helpers for collapsed parent IDs using the established inbox-storage pattern.
ui/src/pages/Inbox.tsx Initializes, reloads, and saves collapsed-parent state across remounts, company changes, pointer actions, and keyboard actions.
ui/src/lib/inbox.test.ts Covers company isolation, empty values, missing values, and invalid stored payloads for the new helpers.
ui/src/pages/Inbox.test.tsx Verifies that both collapsed and expanded parent states survive inbox remounts.

Reviews (1): Last reviewed commit: "fix(ui): persist inbox subtask folds" | Re-trigger Greptile

Co-Authored-By: Paperclip <noreply@paperclip.ing>
@cryppadotta
cryppadotta force-pushed the fix/remember-folded-inbox-subtasks branch from b52f443 to 18cd80c Compare August 8, 2026 19:14
@cryppadotta

Copy link
Copy Markdown
Contributor Author

@greptile review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant