Skip to content

feat(web): rename focused sidebar thread with f2 - #132

Merged
tarik02 merged 1 commit into
mainfrom
backport/f2-thread-rename
Aug 13, 2026
Merged

feat(web): rename focused sidebar thread with f2#132
tarik02 merged 1 commit into
mainfrom
backport/f2-thread-rename

Conversation

@tarik02

@tarik02 tarik02 commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

What Changed

Backports pingdotgg/t3code#6454.

Pressing F2 while focus is within a sidebar thread item opens its inline rename field and selects the full title. Enter saves the title and Escape cancels. This works in both sidebar implementations, and the shortcut remains configurable as thread.rename.

The sidebar also retains focus when navigating between threads instead of moving it to the composer.

Why

Thread rename was limited to pointer interactions. F2 makes it keyboard-accessible while keeping the shortcut scoped to the focused thread.

UI Changes

browser-recording-msrelwa3.mp4

Verification

  • 196 focused tests passed
  • Focused lint passed for all changed code
  • Contracts, shared, and web typechecks passed
  • The backport patch-id matches upstream PR #6454

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for the interaction change

Made with GPT-5.6 Sol via the Codex harness in T3 Code.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M labels Aug 13, 2026

@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: 362bf0db6d

ℹ️ 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 apps/web/src/components/Sidebar.tsx Outdated
Comment on lines +914 to +918
const terminalOpen = selectThreadTerminalUiState(
useTerminalUiStateStore.getState().terminalUiStateByThreadKey,
threadRef,
).terminalOpen;
const command = resolveShortcutCommand(event, props.keybindings, {

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 Resolve rename against the active shortcut context

When focus is on an inactive row, this evaluates when clauses using that row's terminal state and defaults other standard context keys to false, while the global shortcut handlers consistently use the active routed thread and current UI state. For example, if the active thread has its terminal open and a user places an f2 binding such as terminal.toggle when terminalOpen after thread.rename, pressing F2 on an inactive row with no terminal incorrectly starts renaming and stops propagation instead of honoring the later binding. Use the same active shortcut context here and in the equivalent LegacySidebar handler.

Useful? React with 👍 / 👎.

@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 10.5 KiB 10.5 KiB −27 B (−0.3%) 15.1 KiB
Codex Thread snapshot wire 4.8 KiB 4.8 KiB −6 B (−0.1%) 7.3 KiB
Codex Live turn WebSocket wire 5.7 KiB 5.7 KiB −21 B (−0.4%) 7.8 KiB
Codex Live turn WebSocket decoded 50.3 KiB 50.3 KiB −44 B (−0.1%) 66.4 KiB
Codex Live turn messages 11 10 −1 (−9.1%) 21
Claude Total thread wire 10.5 KiB 10.5 KiB +25 B (+0.2%) 15.1 KiB
Claude Thread snapshot wire 4.8 KiB 4.8 KiB −3 B (−0.1%) 7.3 KiB
Claude Live turn WebSocket wire 5.7 KiB 5.7 KiB +28 B (+0.5%) 7.8 KiB
Claude Live turn WebSocket decoded 51.1 KiB 51.1 KiB +44 B (+0.1%) 66.4 KiB
Claude Live turn messages 9 10 +1 (+11.1%) 21

Baseline: f9d2e2e · PR result: 0d6733e · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 76.2 KiB
  • Claude decoded thread snapshot: 76.6 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@tarik02
tarik02 force-pushed the backport/f2-thread-rename branch 2 times, most recently from 3a4169a to 2d685ba Compare August 13, 2026 11:35
@github-actions github-actions Bot added size:L and removed size:M labels Aug 13, 2026
@tarik02
tarik02 force-pushed the backport/f2-thread-rename branch 3 times, most recently from 3b7ddee to 10388d2 Compare August 13, 2026 12:01
@tarik02
tarik02 force-pushed the backport/f2-thread-rename branch from 10388d2 to 0d6733e Compare August 13, 2026 12:07
@tarik02
tarik02 merged commit 13fc404 into main Aug 13, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant