Skip to content

refactor(board): isolate Paper Board preference storage - #2937

Open
Chris0Jeky wants to merge 2 commits into
mainfrom
codex/refactor-paper-board-preferences
Open

refactor(board): isolate Paper Board preference storage#2937
Chris0Jeky wants to merge 2 commits into
mainfrom
codex/refactor-paper-board-preferences

Conversation

@Chris0Jeky

Copy link
Copy Markdown
Owner

Summary

  • Extract Paper Board presentation-preference keys, validation, and local-storage handling into a focused utility.
  • Keep malformed or unavailable storage fail-safe, user-scoped collapse persistence, stable ordering, and the existing v1 non-migration behavior.
  • Add direct contract tests for the utility while retaining the existing Paper Board view coverage.

Scope

Behavior-preserving structural refactor only. No rendered markup, preference keys, defaults, or user-facing copy changed.

Checks

  • npm.cmd run typecheck — passed on the exact merged head.
  • npx vitest --run --maxWorkers=2 src/tests/utils/paperBoardPreferences.spec.ts src/tests/views/paper/PaperBoardView.spec.ts src/tests/composables/useReviewProposals.healthReactivity.spec.ts — 80/80 passed on the exact merged head.
  • npm.cmd run build — passed, including Vite/PWA generation.
  • npm.cmd run lint — passed with 9 existing warnings and 0 errors.
  • npx vitest --run --maxWorkers=2 — 6,466 passed, 3 skipped across 419 files before merging the unrelated current-main base update; the post-merge targeted run covers that base's added review-proposal test.

Review notes

The branch includes a conflict-free merge of current origin/main (3105aede0) so the proposed diff is against the latest main line. Please review the utility boundary and confirm the preserved storage contract.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-10T18:49:46.674699Z 253f47f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 253f47ff4d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

}
persistedCollapsedColumnIds.value = readCollapsedColumnIds(session.userId)
density.value = readStoredPreference<BoardDensity>(
window.localStorage,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep localStorage acquisition inside the guarded boundary

When the browser's localStorage getter itself throws a SecurityError—for example, under blocked persistence or an opaque/invalid origin—this argument is evaluated before readStoredPreference enters its try, so the Paper Board's mounted hook aborts instead of using the fallback as it did before the refactor. The new utility tests only cover an already-acquired Storage whose methods throw; acquire storage inside the guarded helper or retain a caller-side try around the complete access.

Useful? React with 👍 / 👎.

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

Labels

None yet

Projects

Status: Pending

Development

Successfully merging this pull request may close these issues.

1 participant