Skip to content

fix(ui): the test case or Finding you selected stays selected when you come back to its tab - #155

Merged
vriesd merged 2 commits into
mainfrom
fix/keep-record-selection
Nov 14, 2026
Merged

vriesd merged 2 commits into
mainfrom
fix/keep-record-selection

Conversation

@vriesd

@vriesd vriesd commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

When you selected an older test case or Finding (say the second one in the list), then went to another tab or started a new draft from the Note and cancelled it, the tab came back on the newest record instead of the one you picked.

The Test cases and Findings views unmount while another tab is open, and the selection lived inside them. The controller now remembers the selected record per view (useRecordSelection): the views start from it and report each selection, and navigation that opens a specific record (Library, a route, a created record) sets it through focusRecord, which also keeps the route's focused record as before. The URL hash still only changes on navigation, not on every click.

Also removes dead code: the unused statusLabel and the unused mergeRecordLists re-export.

Proof: new AppShell.recordSelection.test.tsx and useRecordSelection.test.ts fail on main and passes here; bun run verify:fast green (1579 tests); a temporary e2e spec in the built Tauri app selected the older of two test cases, switched Findings → Note → Test cases, then opened and cancelled Create test cases from the Note, and the older record stayed selected both times.

Reviewed with sol-loop: 2 rounds with gpt-6.1-sol. Sol verdict: approved

Created with Claude Opus 5.5 in Claude Code (T3 Code).

🤖 Generated with Claude Code

…u come back to its tab

Selecting an older record, then opening another tab or starting a new draft
from the Note, brought the tab back on the newest record: the record views
unmount while another tab is open, and their selection lived inside them.

The controller now remembers the selected record per view (useRecordSelection).
The views start from it and report each selection; navigation that opens a
specific record (Library, a route, a created record) sets it through
focusRecord, which also keeps the route's focused record.

Removes the unused statusLabel and the unused mergeRecordLists re-export.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T07:51:52.302614Z fe5a5a9 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: fe5a5a910f

ℹ️ 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".

Comment thread frontend/src/app/AppShell.tsx Resolved
Comment thread frontend/src/app/useRecordSelection.ts Resolved
…tab loads

The view reports no selection while its records load, which cleared the record
navigation had just focused, so the tab opened on the newest record. An empty
report no longer clears the remembered selection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vriesd
vriesd merged commit d595ede into main Nov 14, 2026
8 checks passed
@vriesd
vriesd deleted the fix/keep-record-selection branch November 14, 2026 08:14
@vriesd vriesd mentioned this pull request Nov 14, 2026
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.

2 participants