Skip to content

Sync chat history selection with the active conversation tab - #17

Open
priva7eer wants to merge 1 commit into
Netroforge:mainfrom
priva7eer:fix/active-chat-selection-pr
Open

priva7eer wants to merge 1 commit into
Netroforge:mainfrom
priva7eer:fix/active-chat-selection-pr

Conversation

@priva7eer

Copy link
Copy Markdown

Summary

After opening a chat from Codex Chats, switching editor tabs or starting a new Codex conversation leaves the previously clicked chat highlighted. This makes the list appear to identify the wrong active conversation.

Follow the active editor tab across tab groups using its conversation URI. Reveal and select the matching chat without moving keyboard focus, and reconcile selection when that session appears in the index. Ordinary history refreshes keep row identities stable and do not repeatedly scroll the list.

New Codex tabs can retain /extension/panel/new even after a conversation has started. In that case, invalidate the previous selection instead of guessing which conversation is inside the panel. Because the public TreeView API has no clear-selection method, leaf identities receive a new revision when the active editor changes; group identities remain stable to preserve collapse state. Inline open actions continue to use the underlying session ID.

Scope: this fixes stale selection in Codex Extras. It does not rename the official extension's generic Codex tab or automatically select a conversation whose ID is absent from that tab's URI. Opening the named chat from the list uses its conversation-specific URI. This limitation and workaround are documented in README.

Independent of #13 and #15. No version bump, settings changes, dependencies, internal IPC, or generated build artifacts.

Validation

  • Windows / Node 24.14.0: npm test (16/16), npm run package -- --out codex-extras-selection.vsix.
  • Ubuntu via WSL / Node 22.23.3: npm test (16/16), npm run package -- --out codex-extras-status-ci.vsix. WSL dependencies installed from the npm cache with --offline --ignore-scripts --no-audit --no-fund because DNS was unavailable.
  • Regression tests cover tab-group switches, non-focus-stealing reveal options, unresolved new panels, late index entries, stable refresh identities, and inline open actions. The two regression cases failed before the fix during development.
  • Manual Windows feedback confirmed that starting a new generic Codex tab no longer leaves the old chat highlighted. It correctly leaves no chat selected until the conversation can be identified.
  • git diff --check passes.

Checklist

  • The change is focused and contains no unrelated files.
  • npm test passes.
  • npm run package succeeds.
  • User-facing behavior is documented.
  • CHANGELOG.md is updated when appropriate.
  • No credentials, personal data, or generated build artifacts are committed.

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