Skip to content

Move Linear issue view to localStorage - #13391

Merged
AmethystLiang merged 1 commit into
mainfrom
fix-linear-persistent
Aug 9, 2026
Merged

AmethystLiang merged 1 commit into
mainfrom
fix-linear-persistent

Conversation

@AmethystLiang

Copy link
Copy Markdown
Contributor

Problem

Linear issue-list layout (view mode, grouping, ordering, filters) was persisted through taskResumeState via the RPC wire protocol. The schema is .strict(), so hosts that predate this field silently reject the entire taskResumeState — including GitHub and Jira settings — when receiving it from a newer version. This breaks remote pairing across version boundaries.

Solution

Move Linear issue view to browser localStorage as device-local storage instead of cross-host RPC state. Removes linearIssueView from the strict TaskResumeState schema, restoring backward compatibility with older hosts.

  • New linear-issue-view-storage.ts with loadLinearIssueView() and saveLinearIssueView() backed by localStorage
  • Removed linearIssueView from TaskResumeState schema (task-resume-state-schema.ts) and type (shared/types.ts)
  • Updated TaskPage.tsx to load/save view from localStorage instead of RPC state
  • Unit tests cover localStorage round-trip, corruption resilience, and normalization
  • E2E tests verify user-visible persistence with mocked Linear backend
  • Schema test confirms field no longer persists through RPC

Screenshots

No visual change.

Testing

  • Added high-quality tests for localStorage layer
  • E2E persistence tests updated and passing
  • pnpm lint
  • pnpm typecheck
  • pnpm test
  • pnpm build

AI Review Report

TODO

Security Audit

TODO

Notes

Breaking change for paired clients: Older hosts no longer receive linearIssueView in taskResumeState, preventing them from discarding GitHub and Jira settings when this field is present.

Prevent older paired hosts from discarding the entire taskResumeState
when they encounter the strict linearIssueView field, which was causing
silent loss of github and jira queries during remote pairing. Layout,
grouping, ordering, and per-workspace filters are now device-local.
@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ba81fe06-c08d-467f-92e5-e4a70087da71

📥 Commits

Reviewing files that changed from the base of the PR and between 86831dc and 51dce62.

📒 Files selected for processing (10)
  • src/main/runtime/rpc/methods/client-ui-linear-issue-view.test.ts
  • src/main/runtime/rpc/methods/client-ui-task-resume-state.test.ts
  • src/main/runtime/rpc/methods/task-resume-state-schema.ts
  • src/renderer/src/components/TaskPage.tsx
  • src/renderer/src/components/linear-issue-view-storage.test.ts
  • src/renderer/src/components/linear-issue-view-storage.ts
  • src/renderer/src/store/slices/ui.test.ts
  • src/renderer/src/store/slices/ui.ts
  • src/shared/types.ts
  • tests/e2e/linear-issue-view-persistence.spec.ts
💤 Files with no reviewable changes (3)
  • src/main/runtime/rpc/methods/client-ui-linear-issue-view.test.ts
  • src/shared/types.ts
  • src/renderer/src/store/slices/ui.ts

📝 Walkthrough

Walkthrough

Linear issue view state was removed from TaskResumeState, its schema, RPC handling, and UI hydration. New local storage helpers load, normalize, save, and clear the state. TaskPage now uses these helpers instead of task resume state. Unit and end-to-end tests were updated to validate local storage persistence and rejection of stale host-provided view data.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the problem and solution, but required AI Review Report and Security Audit sections remain TODO, and most validation checks are incomplete. Complete the AI Review Report and Security Audit, and run or document the results for lint, typecheck, test, and build.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary change: moving Linear issue-view persistence to localStorage.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@AmethystLiang
AmethystLiang merged commit d23dda6 into main Aug 9, 2026
48 checks passed
zpyoung pushed a commit to zpyoung/orca that referenced this pull request Aug 11, 2026
Prevent older paired hosts from discarding the entire taskResumeState
when they encounter the strict linearIssueView field, which was causing
silent loss of github and jira queries during remote pairing. Layout,
grouping, ordering, and per-workspace filters are now device-local.

(cherry picked from commit d23dda6)
(cherry picked from commit e448c68)
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
Prevent older paired hosts from discarding the entire taskResumeState
when they encounter the strict linearIssueView field, which was causing
silent loss of github and jira queries during remote pairing. Layout,
grouping, ordering, and per-workspace filters are now device-local.
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