feat(web): improve terminal workspace controls - #7149

Closed
maria-rcks wants to merge 17 commits into
mainfrom
ui-refresh/terminal
Closed

feat(web): improve terminal workspace controls#7149
maria-rcks wants to merge 17 commits into
mainfrom
ui-refresh/terminal

Conversation

@maria-rcks

@maria-rcksmaria-rcks commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

What changed

  • Reworks the terminal drawer controls and multi-session sidebar while retaining split groups and resize behavior.
  • Persists custom terminal names by scoped thread, prunes stale labels, and clears labels when terminals or threads disappear.
  • Adds an explicit drawer hide path and keeps single-terminal sessions free of unnecessary sidebar chrome.

Screenshots

Direct parent on the left; this PR on the right. Same viewport and copied application state.

BeforeAfter
Terminal drawer beforeTerminal drawer after
## Why

Terminal state and interaction changes need a focused review. This layer depends only on the shared chat header from #7153.

Validation

  • Terminal drawer tests
  • Terminal UI store migration, naming, cleanup, reconciliation, and sidebar tests
  • Affected-package typechecks
  • Changed-file lint and formatting checks

Stack order

  1. feat(web): unify workspace navigation #7153 workspace and navigation
  2. feat(web): redesign usage insights #7147 Usage
  3. feat(web): refresh pull request details #7148 Pull Requests
  4. feat(web): improve terminal workspace controls #7149 terminal, this PR
  5. feat(web): attach composer state drawers #7150 composer
  6. fix(server): preserve tool lifecycle identity #7151 tool lifecycle projection
  7. feat(web): collapse tool activity into one line #7152 tool activity UI

Built with GPT-5.6-sol in the Codex harness.


Note

Medium Risk
Touches persisted terminal UI state (migration v5) and server/client terminal ID reconciliation; behavior is covered by tests but wrong label pruning could affect multi-surface terminal UX.

Overview
Reworks the thread terminal drawer with a resizable session sidebar, persisted per-terminal names, and a toolbar action to hide the drawer without closing sessions.

The multi-terminal sidebar moves to the right of the viewport with a drag handle (useResizableWidth + separate localStorage keys for drawer vs panel). Width is capped so the terminal area keeps a minimum usable width. Toolbar actions switch from popover hover buttons to compact icon tooltips; drawer mode adds Hide (wired from ChatView via onHide).

Custom terminal labels are stored in terminalUiStateStore (persist v5): rename via double-click or F2, with logic so unchanged automatic titles are not saved as custom names. Labels apply in the drawer list and in ChatView composer terminal chips. Closing a terminal or pruning during reconcileTerminalIds drops stale labels; reconciliation can pass panel terminal ids so right-panel sessions keep names when drawer state syncs from the server.

Single-terminal layout keeps a floating compact toolbar only (no sidebar chrome).

Reviewed by Cursor Bugbot for commit 69bbbf1. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Improve terminal workspace controls with inline renaming, custom labels, and resizable sidebar

  • Adds inline terminal renaming (double-click or F2) in ThreadTerminalDrawer, persisting custom labels up to 80 chars in terminalUiStateStore (version bumped 4→5 with migration).
  • Introduces a resizable terminal sidebar with dynamic max-width clamping and per-context persisted widths; sidebar hides when only one terminal is open.
  • Adds onHide callback to ThreadTerminalDrawer and wires it through ChatViewContent so the drawer can request to be hidden.
  • Reworks PullRequestDetailPanel to prioritize conflict resolution in the primary action slot and adds a stacked-PR detection via isStackedPullRequestBase and a new listRefs query.
  • Adds rightPanelUnavailableLabel prop to PanelLayoutControls and ensures tooltip triggers remain interactive when toggles are disabled.
  • Removes chromeVariant prop from PullRequestDetailPanel and its callers; condensed state is now derived solely from scroll position.
  • Risk: terminalUiStateStore persistence version increment triggers migration for all existing users; label data not matching the new schema is silently dropped.

Macroscope summarized 69bbbf1.

@coderabbitai

coderabbitaiBot commented Aug 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: dcb2d16b-de0c-4b21-b181-d99a892ed553

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx
@github-actions

github-actionsBot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

ProviderMetricMain baselineThis PRImpactPR ceiling
CodexTotal thread wire12.6 KiB15.1 KiB
CodexThread snapshot wire6.3 KiB7.3 KiB
CodexLive turn WebSocket wire6.3 KiB7.8 KiB
CodexLive turn WebSocket decoded51.8 KiB66.4 KiB
CodexLive turn messages1621
ClaudeTotal thread wire12.6 KiB15.1 KiB
ClaudeThread snapshot wire6.3 KiB7.3 KiB
ClaudeLive turn WebSocket wire6.3 KiB7.8 KiB
ClaudeLive turn WebSocket decoded52.7 KiB66.4 KiB
ClaudeLive turn messages1621

Baseline: unavailable · PR result: 69bbbf1 · 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: 99.9 KiB
  • Claude decoded thread snapshot: 100.6 KiB

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

@macroscopeappmacroscopeappBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

UI consistency review of the terminal drawer refresh. The migration to Button size="icon-xs" for the toolbar, the RightPanelResizeHandle/useResizableWidth reuse for the sidebar, and the tab-row treatment copied from RightPanelTabs all line up with the shared component system. Two tooltip-related consistency notes below; nothing else looked like a regression.

Posted via Macroscope — UI Consistency

Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
@macroscopeapp

macroscopeappBot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR introduces new user-facing features including terminal renaming, a resizable sidebar, and stacked pull request detection. The scope and complexity of these new capabilities, combined with unresolved findings about stale label pruning and resize persistence behavior, warrant human review.

Not approved because:

  • 2 blocking correctness issues found at or above your repo's Minimum Blocking Severity

Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more.

@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 8c3da41 to 89fac2aCompareAugust 16, 2026 01:24
Comment threadapps/web/src/terminalUiStateStore.ts

@macroscopeappmacroscopeappBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Two new findings on the terminal sidebar chrome. The two tooltip findings from the previous run (native title where the sibling tab bar / compact toolbars use the shared Tooltip, and the unreachable split-limit wording on the disabled Button) are still open and unchanged.

Posted via Macroscope — UI Consistency

Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 89fac2a to b45d74eCompareAugust 16, 2026 01:32
@maria-rcks
maria-rcksforce-pushed the ui-refresh/terminal branch 2 times, most recently from e4900e7 to 4cfb51cCompareAugust 16, 2026 01:36
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from b45d74e to 1dd5875CompareAugust 16, 2026 01:36

@macroscopeappmacroscopeappBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

UI consistency review of the terminal drawer refresh. Two new findings on the added controls; previously flagged items (sidebar toolbar overflow at the 144px min width, per-instance useResizableWidth state sharing one storage key, native title instead of the shared Tooltip) still apply and are not repeated here.

Posted via Macroscope — UI Consistency

Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
@maria-rcks
maria-rcksforce-pushed the ui-refresh/terminal branch 2 times, most recently from 6bc8da6 to 6978c5bCompareAugust 16, 2026 01:49
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch 2 times, most recently from 0437edb to 5cc755cCompareAugust 16, 2026 01:51
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 5cc755c to b73193dCompareAugust 16, 2026 01:59
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 5ea3cfa to da3f3d2CompareAugust 19, 2026 05:16
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from da3f3d2 to 9d9746aCompareAugust 19, 2026 05:32
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 9d9746a to 02917c5CompareAugust 19, 2026 05:35
@maria-rcks
maria-rcksforce-pushed the ui-refresh/terminal branch 2 times, most recently from 1a2d460 to ce2d484CompareAugust 19, 2026 05:40
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 02917c5 to bd7ac13CompareAugust 19, 2026 05:40
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Medium

if(terminalIdListsEqual(serverOrderedTerminalIds,terminalUiState.terminalIds)){

Stale custom labels remain persisted when the server and drawer terminal IDs are equal, so a label for a deleted terminal is never pruned and can be reused when that ID is allocated again. The early return skips reconcileTerminalIds, which performs the label pruning; allow reconciliation to run in this case.

🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @apps/web/src/components/ChatView.tsx around line 790:
Stale custom labels remain persisted when the server and drawer terminal IDs are equal, so a label for a deleted terminal is never pruned and can be reused when that ID is allocated again. The early return skips `reconcileTerminalIds`, which performs the label pruning; allow reconciliation to run in this case.

@cursorcursorBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 69bbbf1. Configure here.

if (dragStateRef.current === null && dragWidth !== null) {
setDragWidth(null);
}
}, [dragWidth, storedWidth]);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Resize reverts if persist fails

Medium Severity

After a resize ends, dragWidth is cleared whenever the pointer is not down. Display then falls back to storedWidth. If setStoredWidth fails (quota or write error, which useLocalStorage swallows), the panel snaps back to the old width instead of keeping the drag result. Previously in-memory width still updated after a failed persist.

Additional Locations (1)
Fix in CursorFix in Web

Reviewed by Cursor Bugbot for commit 69bbbf1. Configure here.

Comment on lines +126 to +130
const repositoryPath =
/^(.*?)\/-\/merge_requests\/\d+(?:\/|$)/iu.exec(url.pathname)?.[1] ??
/^(.*?)(?:\/pull\/\d+|\/-\/merge_requests\/\d+|\/pull-requests\/\d+|\/pullrequest\/\d+)(?:\/|$)/iu.exec(
url.pathname,
)?.[1];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Mediumlib/openPullRequestLink.ts:126

changeRequestRepositoryUrl returns null for valid Azure URLs such as https://dev.azure.com/pull/123/_git/repo/pullrequest/42, and can return a truncated repository URL for similar paths. Its non-greedy fallback stops at the first /pull/<number>-like segment instead of the final PR suffix; extract the repository path using the last recognized provider suffix.

- const repositoryPath =- /^(.*?)\/\/-\/merge_requests\/\d+(?:\/|$)/iu.exec(url.pathname)?.[1] ??- /^(.*?)(?:\/pull\/\d+|\/-\/merge_requests\/\d+|\/pull-requests\/\d+|\/pullrequest\/\d+)(?:\/|$)/iu.exec(- url.pathname,- )?.[1];+ const repositoryPath = /^(.*)(?:\/pull\/\d+|\/-\/merge_requests\/\d+|\/pull-requests\/\d+|\/pullrequest\/\d+)(?:\/|$)/iu.exec(+ url.pathname,+ )?.[1];
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @apps/web/src/lib/openPullRequestLink.ts around lines 126-130:
`changeRequestRepositoryUrl` returns `null` for valid Azure URLs such as `https://dev.azure.com/pull/123/_git/repo/pullrequest/42`, and can return a truncated repository URL for similar paths. Its non-greedy fallback stops at the first `/pull/<number>`-like segment instead of the final PR suffix; extract the repository path using the last recognized provider suffix.

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

Labels

size:XL500-999 changed lines (additions + deletions).vouch:trustedPR 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

@maria-rcks
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

feat(web): improve terminal workspace controls - #7149

Closed
maria-rcks wants to merge 17 commits into
mainfrom
ui-refresh/terminal
Closed

feat(web): improve terminal workspace controls#7149
maria-rcks wants to merge 17 commits into
mainfrom
ui-refresh/terminal

Conversation

@maria-rcks

@maria-rcksmaria-rcks commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

What changed

  • Reworks the terminal drawer controls and multi-session sidebar while retaining split groups and resize behavior.
  • Persists custom terminal names by scoped thread, prunes stale labels, and clears labels when terminals or threads disappear.
  • Adds an explicit drawer hide path and keeps single-terminal sessions free of unnecessary sidebar chrome.

Screenshots

Direct parent on the left; this PR on the right. Same viewport and copied application state.

BeforeAfter
Terminal drawer beforeTerminal drawer after
## Why

Terminal state and interaction changes need a focused review. This layer depends only on the shared chat header from #7153.

Validation

  • Terminal drawer tests
  • Terminal UI store migration, naming, cleanup, reconciliation, and sidebar tests
  • Affected-package typechecks
  • Changed-file lint and formatting checks

Stack order

  1. feat(web): unify workspace navigation #7153 workspace and navigation
  2. feat(web): redesign usage insights #7147 Usage
  3. feat(web): refresh pull request details #7148 Pull Requests
  4. feat(web): improve terminal workspace controls #7149 terminal, this PR
  5. feat(web): attach composer state drawers #7150 composer
  6. fix(server): preserve tool lifecycle identity #7151 tool lifecycle projection
  7. feat(web): collapse tool activity into one line #7152 tool activity UI

Built with GPT-5.6-sol in the Codex harness.


Note

Medium Risk
Touches persisted terminal UI state (migration v5) and server/client terminal ID reconciliation; behavior is covered by tests but wrong label pruning could affect multi-surface terminal UX.

Overview
Reworks the thread terminal drawer with a resizable session sidebar, persisted per-terminal names, and a toolbar action to hide the drawer without closing sessions.

The multi-terminal sidebar moves to the right of the viewport with a drag handle (useResizableWidth + separate localStorage keys for drawer vs panel). Width is capped so the terminal area keeps a minimum usable width. Toolbar actions switch from popover hover buttons to compact icon tooltips; drawer mode adds Hide (wired from ChatView via onHide).

Custom terminal labels are stored in terminalUiStateStore (persist v5): rename via double-click or F2, with logic so unchanged automatic titles are not saved as custom names. Labels apply in the drawer list and in ChatView composer terminal chips. Closing a terminal or pruning during reconcileTerminalIds drops stale labels; reconciliation can pass panel terminal ids so right-panel sessions keep names when drawer state syncs from the server.

Single-terminal layout keeps a floating compact toolbar only (no sidebar chrome).

Reviewed by Cursor Bugbot for commit 69bbbf1. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Improve terminal workspace controls with inline renaming, custom labels, and resizable sidebar

  • Adds inline terminal renaming (double-click or F2) in ThreadTerminalDrawer, persisting custom labels up to 80 chars in terminalUiStateStore (version bumped 4→5 with migration).
  • Introduces a resizable terminal sidebar with dynamic max-width clamping and per-context persisted widths; sidebar hides when only one terminal is open.
  • Adds onHide callback to ThreadTerminalDrawer and wires it through ChatViewContent so the drawer can request to be hidden.
  • Reworks PullRequestDetailPanel to prioritize conflict resolution in the primary action slot and adds a stacked-PR detection via isStackedPullRequestBase and a new listRefs query.
  • Adds rightPanelUnavailableLabel prop to PanelLayoutControls and ensures tooltip triggers remain interactive when toggles are disabled.
  • Removes chromeVariant prop from PullRequestDetailPanel and its callers; condensed state is now derived solely from scroll position.
  • Risk: terminalUiStateStore persistence version increment triggers migration for all existing users; label data not matching the new schema is silently dropped.

Macroscope summarized 69bbbf1.

@coderabbitai

coderabbitaiBot commented Aug 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: dcb2d16b-de0c-4b21-b181-d99a892ed553

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx
@github-actions

github-actionsBot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

ProviderMetricMain baselineThis PRImpactPR ceiling
CodexTotal thread wire12.6 KiB15.1 KiB
CodexThread snapshot wire6.3 KiB7.3 KiB
CodexLive turn WebSocket wire6.3 KiB7.8 KiB
CodexLive turn WebSocket decoded51.8 KiB66.4 KiB
CodexLive turn messages1621
ClaudeTotal thread wire12.6 KiB15.1 KiB
ClaudeThread snapshot wire6.3 KiB7.3 KiB
ClaudeLive turn WebSocket wire6.3 KiB7.8 KiB
ClaudeLive turn WebSocket decoded52.7 KiB66.4 KiB
ClaudeLive turn messages1621

Baseline: unavailable · PR result: 69bbbf1 · 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: 99.9 KiB
  • Claude decoded thread snapshot: 100.6 KiB

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

@macroscopeappmacroscopeappBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

UI consistency review of the terminal drawer refresh. The migration to Button size="icon-xs" for the toolbar, the RightPanelResizeHandle/useResizableWidth reuse for the sidebar, and the tab-row treatment copied from RightPanelTabs all line up with the shared component system. Two tooltip-related consistency notes below; nothing else looked like a regression.

Posted via Macroscope — UI Consistency

Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
@macroscopeapp

macroscopeappBot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR introduces new user-facing features including terminal renaming, a resizable sidebar, and stacked pull request detection. The scope and complexity of these new capabilities, combined with unresolved findings about stale label pruning and resize persistence behavior, warrant human review.

Not approved because:

  • 2 blocking correctness issues found at or above your repo's Minimum Blocking Severity

Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more.

@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 8c3da41 to 89fac2aCompareAugust 16, 2026 01:24
Comment threadapps/web/src/terminalUiStateStore.ts

@macroscopeappmacroscopeappBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Two new findings on the terminal sidebar chrome. The two tooltip findings from the previous run (native title where the sibling tab bar / compact toolbars use the shared Tooltip, and the unreachable split-limit wording on the disabled Button) are still open and unchanged.

Posted via Macroscope — UI Consistency

Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 89fac2a to b45d74eCompareAugust 16, 2026 01:32
@maria-rcks
maria-rcksforce-pushed the ui-refresh/terminal branch 2 times, most recently from e4900e7 to 4cfb51cCompareAugust 16, 2026 01:36
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from b45d74e to 1dd5875CompareAugust 16, 2026 01:36

@macroscopeappmacroscopeappBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

UI consistency review of the terminal drawer refresh. Two new findings on the added controls; previously flagged items (sidebar toolbar overflow at the 144px min width, per-instance useResizableWidth state sharing one storage key, native title instead of the shared Tooltip) still apply and are not repeated here.

Posted via Macroscope — UI Consistency

Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
@maria-rcks
maria-rcksforce-pushed the ui-refresh/terminal branch 2 times, most recently from 6bc8da6 to 6978c5bCompareAugust 16, 2026 01:49
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch 2 times, most recently from 0437edb to 5cc755cCompareAugust 16, 2026 01:51
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 5cc755c to b73193dCompareAugust 16, 2026 01:59
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 5ea3cfa to da3f3d2CompareAugust 19, 2026 05:16
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from da3f3d2 to 9d9746aCompareAugust 19, 2026 05:32
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 9d9746a to 02917c5CompareAugust 19, 2026 05:35
@maria-rcks
maria-rcksforce-pushed the ui-refresh/terminal branch 2 times, most recently from 1a2d460 to ce2d484CompareAugust 19, 2026 05:40
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 02917c5 to bd7ac13CompareAugust 19, 2026 05:40
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Medium

if(terminalIdListsEqual(serverOrderedTerminalIds,terminalUiState.terminalIds)){

Stale custom labels remain persisted when the server and drawer terminal IDs are equal, so a label for a deleted terminal is never pruned and can be reused when that ID is allocated again. The early return skips reconcileTerminalIds, which performs the label pruning; allow reconciliation to run in this case.

🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @apps/web/src/components/ChatView.tsx around line 790:
Stale custom labels remain persisted when the server and drawer terminal IDs are equal, so a label for a deleted terminal is never pruned and can be reused when that ID is allocated again. The early return skips `reconcileTerminalIds`, which performs the label pruning; allow reconciliation to run in this case.

@cursorcursorBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 69bbbf1. Configure here.

if (dragStateRef.current === null && dragWidth !== null) {
setDragWidth(null);
}
}, [dragWidth, storedWidth]);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Resize reverts if persist fails

Medium Severity

After a resize ends, dragWidth is cleared whenever the pointer is not down. Display then falls back to storedWidth. If setStoredWidth fails (quota or write error, which useLocalStorage swallows), the panel snaps back to the old width instead of keeping the drag result. Previously in-memory width still updated after a failed persist.

Additional Locations (1)
Fix in CursorFix in Web

Reviewed by Cursor Bugbot for commit 69bbbf1. Configure here.

Comment on lines +126 to +130
const repositoryPath =
/^(.*?)\/-\/merge_requests\/\d+(?:\/|$)/iu.exec(url.pathname)?.[1] ??
/^(.*?)(?:\/pull\/\d+|\/-\/merge_requests\/\d+|\/pull-requests\/\d+|\/pullrequest\/\d+)(?:\/|$)/iu.exec(
url.pathname,
)?.[1];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Mediumlib/openPullRequestLink.ts:126

changeRequestRepositoryUrl returns null for valid Azure URLs such as https://dev.azure.com/pull/123/_git/repo/pullrequest/42, and can return a truncated repository URL for similar paths. Its non-greedy fallback stops at the first /pull/<number>-like segment instead of the final PR suffix; extract the repository path using the last recognized provider suffix.

- const repositoryPath =- /^(.*?)\/\/-\/merge_requests\/\d+(?:\/|$)/iu.exec(url.pathname)?.[1] ??- /^(.*?)(?:\/pull\/\d+|\/-\/merge_requests\/\d+|\/pull-requests\/\d+|\/pullrequest\/\d+)(?:\/|$)/iu.exec(- url.pathname,- )?.[1];+ const repositoryPath = /^(.*)(?:\/pull\/\d+|\/-\/merge_requests\/\d+|\/pull-requests\/\d+|\/pullrequest\/\d+)(?:\/|$)/iu.exec(+ url.pathname,+ )?.[1];
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @apps/web/src/lib/openPullRequestLink.ts around lines 126-130:
`changeRequestRepositoryUrl` returns `null` for valid Azure URLs such as `https://dev.azure.com/pull/123/_git/repo/pullrequest/42`, and can return a truncated repository URL for similar paths. Its non-greedy fallback stops at the first `/pull/<number>`-like segment instead of the final PR suffix; extract the repository path using the last recognized provider suffix.

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

Labels

size:XL500-999 changed lines (additions + deletions).vouch:trustedPR 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

@maria-rcks
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

feat(web): improve terminal workspace controls - #7149

Closed
maria-rcks wants to merge 17 commits into
mainfrom
ui-refresh/terminal
Closed

feat(web): improve terminal workspace controls#7149
maria-rcks wants to merge 17 commits into
mainfrom
ui-refresh/terminal

Conversation

@maria-rcks

@maria-rcksmaria-rcks commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

What changed

  • Reworks the terminal drawer controls and multi-session sidebar while retaining split groups and resize behavior.
  • Persists custom terminal names by scoped thread, prunes stale labels, and clears labels when terminals or threads disappear.
  • Adds an explicit drawer hide path and keeps single-terminal sessions free of unnecessary sidebar chrome.

Screenshots

Direct parent on the left; this PR on the right. Same viewport and copied application state.

BeforeAfter
Terminal drawer beforeTerminal drawer after
## Why

Terminal state and interaction changes need a focused review. This layer depends only on the shared chat header from #7153.

Validation

  • Terminal drawer tests
  • Terminal UI store migration, naming, cleanup, reconciliation, and sidebar tests
  • Affected-package typechecks
  • Changed-file lint and formatting checks

Stack order

  1. feat(web): unify workspace navigation #7153 workspace and navigation
  2. feat(web): redesign usage insights #7147 Usage
  3. feat(web): refresh pull request details #7148 Pull Requests
  4. feat(web): improve terminal workspace controls #7149 terminal, this PR
  5. feat(web): attach composer state drawers #7150 composer
  6. fix(server): preserve tool lifecycle identity #7151 tool lifecycle projection
  7. feat(web): collapse tool activity into one line #7152 tool activity UI

Built with GPT-5.6-sol in the Codex harness.


Note

Medium Risk
Touches persisted terminal UI state (migration v5) and server/client terminal ID reconciliation; behavior is covered by tests but wrong label pruning could affect multi-surface terminal UX.

Overview
Reworks the thread terminal drawer with a resizable session sidebar, persisted per-terminal names, and a toolbar action to hide the drawer without closing sessions.

The multi-terminal sidebar moves to the right of the viewport with a drag handle (useResizableWidth + separate localStorage keys for drawer vs panel). Width is capped so the terminal area keeps a minimum usable width. Toolbar actions switch from popover hover buttons to compact icon tooltips; drawer mode adds Hide (wired from ChatView via onHide).

Custom terminal labels are stored in terminalUiStateStore (persist v5): rename via double-click or F2, with logic so unchanged automatic titles are not saved as custom names. Labels apply in the drawer list and in ChatView composer terminal chips. Closing a terminal or pruning during reconcileTerminalIds drops stale labels; reconciliation can pass panel terminal ids so right-panel sessions keep names when drawer state syncs from the server.

Single-terminal layout keeps a floating compact toolbar only (no sidebar chrome).

Reviewed by Cursor Bugbot for commit 69bbbf1. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Improve terminal workspace controls with inline renaming, custom labels, and resizable sidebar

  • Adds inline terminal renaming (double-click or F2) in ThreadTerminalDrawer, persisting custom labels up to 80 chars in terminalUiStateStore (version bumped 4→5 with migration).
  • Introduces a resizable terminal sidebar with dynamic max-width clamping and per-context persisted widths; sidebar hides when only one terminal is open.
  • Adds onHide callback to ThreadTerminalDrawer and wires it through ChatViewContent so the drawer can request to be hidden.
  • Reworks PullRequestDetailPanel to prioritize conflict resolution in the primary action slot and adds a stacked-PR detection via isStackedPullRequestBase and a new listRefs query.
  • Adds rightPanelUnavailableLabel prop to PanelLayoutControls and ensures tooltip triggers remain interactive when toggles are disabled.
  • Removes chromeVariant prop from PullRequestDetailPanel and its callers; condensed state is now derived solely from scroll position.
  • Risk: terminalUiStateStore persistence version increment triggers migration for all existing users; label data not matching the new schema is silently dropped.

Macroscope summarized 69bbbf1.

@coderabbitai

coderabbitaiBot commented Aug 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: dcb2d16b-de0c-4b21-b181-d99a892ed553

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx
@github-actions

github-actionsBot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

ProviderMetricMain baselineThis PRImpactPR ceiling
CodexTotal thread wire12.6 KiB15.1 KiB
CodexThread snapshot wire6.3 KiB7.3 KiB
CodexLive turn WebSocket wire6.3 KiB7.8 KiB
CodexLive turn WebSocket decoded51.8 KiB66.4 KiB
CodexLive turn messages1621
ClaudeTotal thread wire12.6 KiB15.1 KiB
ClaudeThread snapshot wire6.3 KiB7.3 KiB
ClaudeLive turn WebSocket wire6.3 KiB7.8 KiB
ClaudeLive turn WebSocket decoded52.7 KiB66.4 KiB
ClaudeLive turn messages1621

Baseline: unavailable · PR result: 69bbbf1 · 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: 99.9 KiB
  • Claude decoded thread snapshot: 100.6 KiB

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

@macroscopeappmacroscopeappBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

UI consistency review of the terminal drawer refresh. The migration to Button size="icon-xs" for the toolbar, the RightPanelResizeHandle/useResizableWidth reuse for the sidebar, and the tab-row treatment copied from RightPanelTabs all line up with the shared component system. Two tooltip-related consistency notes below; nothing else looked like a regression.

Posted via Macroscope — UI Consistency

Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
@macroscopeapp

macroscopeappBot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR introduces new user-facing features including terminal renaming, a resizable sidebar, and stacked pull request detection. The scope and complexity of these new capabilities, combined with unresolved findings about stale label pruning and resize persistence behavior, warrant human review.

Not approved because:

  • 2 blocking correctness issues found at or above your repo's Minimum Blocking Severity

Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more.

@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 8c3da41 to 89fac2aCompareAugust 16, 2026 01:24
Comment threadapps/web/src/terminalUiStateStore.ts

@macroscopeappmacroscopeappBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Two new findings on the terminal sidebar chrome. The two tooltip findings from the previous run (native title where the sibling tab bar / compact toolbars use the shared Tooltip, and the unreachable split-limit wording on the disabled Button) are still open and unchanged.

Posted via Macroscope — UI Consistency

Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 89fac2a to b45d74eCompareAugust 16, 2026 01:32
@maria-rcks
maria-rcksforce-pushed the ui-refresh/terminal branch 2 times, most recently from e4900e7 to 4cfb51cCompareAugust 16, 2026 01:36
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from b45d74e to 1dd5875CompareAugust 16, 2026 01:36

@macroscopeappmacroscopeappBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

UI consistency review of the terminal drawer refresh. Two new findings on the added controls; previously flagged items (sidebar toolbar overflow at the 144px min width, per-instance useResizableWidth state sharing one storage key, native title instead of the shared Tooltip) still apply and are not repeated here.

Posted via Macroscope — UI Consistency

Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
@maria-rcks
maria-rcksforce-pushed the ui-refresh/terminal branch 2 times, most recently from 6bc8da6 to 6978c5bCompareAugust 16, 2026 01:49
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch 2 times, most recently from 0437edb to 5cc755cCompareAugust 16, 2026 01:51
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 5cc755c to b73193dCompareAugust 16, 2026 01:59
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 5ea3cfa to da3f3d2CompareAugust 19, 2026 05:16
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from da3f3d2 to 9d9746aCompareAugust 19, 2026 05:32
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 9d9746a to 02917c5CompareAugust 19, 2026 05:35
@maria-rcks
maria-rcksforce-pushed the ui-refresh/terminal branch 2 times, most recently from 1a2d460 to ce2d484CompareAugust 19, 2026 05:40
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 02917c5 to bd7ac13CompareAugust 19, 2026 05:40
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Medium

if(terminalIdListsEqual(serverOrderedTerminalIds,terminalUiState.terminalIds)){

Stale custom labels remain persisted when the server and drawer terminal IDs are equal, so a label for a deleted terminal is never pruned and can be reused when that ID is allocated again. The early return skips reconcileTerminalIds, which performs the label pruning; allow reconciliation to run in this case.

🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @apps/web/src/components/ChatView.tsx around line 790:
Stale custom labels remain persisted when the server and drawer terminal IDs are equal, so a label for a deleted terminal is never pruned and can be reused when that ID is allocated again. The early return skips `reconcileTerminalIds`, which performs the label pruning; allow reconciliation to run in this case.

@cursorcursorBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 69bbbf1. Configure here.

if (dragStateRef.current === null && dragWidth !== null) {
setDragWidth(null);
}
}, [dragWidth, storedWidth]);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Resize reverts if persist fails

Medium Severity

After a resize ends, dragWidth is cleared whenever the pointer is not down. Display then falls back to storedWidth. If setStoredWidth fails (quota or write error, which useLocalStorage swallows), the panel snaps back to the old width instead of keeping the drag result. Previously in-memory width still updated after a failed persist.

Additional Locations (1)
Fix in CursorFix in Web

Reviewed by Cursor Bugbot for commit 69bbbf1. Configure here.

Comment on lines +126 to +130
const repositoryPath =
/^(.*?)\/-\/merge_requests\/\d+(?:\/|$)/iu.exec(url.pathname)?.[1] ??
/^(.*?)(?:\/pull\/\d+|\/-\/merge_requests\/\d+|\/pull-requests\/\d+|\/pullrequest\/\d+)(?:\/|$)/iu.exec(
url.pathname,
)?.[1];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Mediumlib/openPullRequestLink.ts:126

changeRequestRepositoryUrl returns null for valid Azure URLs such as https://dev.azure.com/pull/123/_git/repo/pullrequest/42, and can return a truncated repository URL for similar paths. Its non-greedy fallback stops at the first /pull/<number>-like segment instead of the final PR suffix; extract the repository path using the last recognized provider suffix.

- const repositoryPath =- /^(.*?)\/\/-\/merge_requests\/\d+(?:\/|$)/iu.exec(url.pathname)?.[1] ??- /^(.*?)(?:\/pull\/\d+|\/-\/merge_requests\/\d+|\/pull-requests\/\d+|\/pullrequest\/\d+)(?:\/|$)/iu.exec(- url.pathname,- )?.[1];+ const repositoryPath = /^(.*)(?:\/pull\/\d+|\/-\/merge_requests\/\d+|\/pull-requests\/\d+|\/pullrequest\/\d+)(?:\/|$)/iu.exec(+ url.pathname,+ )?.[1];
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @apps/web/src/lib/openPullRequestLink.ts around lines 126-130:
`changeRequestRepositoryUrl` returns `null` for valid Azure URLs such as `https://dev.azure.com/pull/123/_git/repo/pullrequest/42`, and can return a truncated repository URL for similar paths. Its non-greedy fallback stops at the first `/pull/<number>`-like segment instead of the final PR suffix; extract the repository path using the last recognized provider suffix.

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

Labels

size:XL500-999 changed lines (additions + deletions).vouch:trustedPR 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

@maria-rcks
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

feat(web): improve terminal workspace controls - #7149

Closed
maria-rcks wants to merge 17 commits into
mainfrom
ui-refresh/terminal
Closed

feat(web): improve terminal workspace controls#7149
maria-rcks wants to merge 17 commits into
mainfrom
ui-refresh/terminal

Conversation

@maria-rcks

@maria-rcksmaria-rcks commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

What changed

  • Reworks the terminal drawer controls and multi-session sidebar while retaining split groups and resize behavior.
  • Persists custom terminal names by scoped thread, prunes stale labels, and clears labels when terminals or threads disappear.
  • Adds an explicit drawer hide path and keeps single-terminal sessions free of unnecessary sidebar chrome.

Screenshots

Direct parent on the left; this PR on the right. Same viewport and copied application state.

BeforeAfter
Terminal drawer beforeTerminal drawer after
## Why

Terminal state and interaction changes need a focused review. This layer depends only on the shared chat header from #7153.

Validation

  • Terminal drawer tests
  • Terminal UI store migration, naming, cleanup, reconciliation, and sidebar tests
  • Affected-package typechecks
  • Changed-file lint and formatting checks

Stack order

  1. feat(web): unify workspace navigation #7153 workspace and navigation
  2. feat(web): redesign usage insights #7147 Usage
  3. feat(web): refresh pull request details #7148 Pull Requests
  4. feat(web): improve terminal workspace controls #7149 terminal, this PR
  5. feat(web): attach composer state drawers #7150 composer
  6. fix(server): preserve tool lifecycle identity #7151 tool lifecycle projection
  7. feat(web): collapse tool activity into one line #7152 tool activity UI

Built with GPT-5.6-sol in the Codex harness.


Note

Medium Risk
Touches persisted terminal UI state (migration v5) and server/client terminal ID reconciliation; behavior is covered by tests but wrong label pruning could affect multi-surface terminal UX.

Overview
Reworks the thread terminal drawer with a resizable session sidebar, persisted per-terminal names, and a toolbar action to hide the drawer without closing sessions.

The multi-terminal sidebar moves to the right of the viewport with a drag handle (useResizableWidth + separate localStorage keys for drawer vs panel). Width is capped so the terminal area keeps a minimum usable width. Toolbar actions switch from popover hover buttons to compact icon tooltips; drawer mode adds Hide (wired from ChatView via onHide).

Custom terminal labels are stored in terminalUiStateStore (persist v5): rename via double-click or F2, with logic so unchanged automatic titles are not saved as custom names. Labels apply in the drawer list and in ChatView composer terminal chips. Closing a terminal or pruning during reconcileTerminalIds drops stale labels; reconciliation can pass panel terminal ids so right-panel sessions keep names when drawer state syncs from the server.

Single-terminal layout keeps a floating compact toolbar only (no sidebar chrome).

Reviewed by Cursor Bugbot for commit 69bbbf1. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Improve terminal workspace controls with inline renaming, custom labels, and resizable sidebar

  • Adds inline terminal renaming (double-click or F2) in ThreadTerminalDrawer, persisting custom labels up to 80 chars in terminalUiStateStore (version bumped 4→5 with migration).
  • Introduces a resizable terminal sidebar with dynamic max-width clamping and per-context persisted widths; sidebar hides when only one terminal is open.
  • Adds onHide callback to ThreadTerminalDrawer and wires it through ChatViewContent so the drawer can request to be hidden.
  • Reworks PullRequestDetailPanel to prioritize conflict resolution in the primary action slot and adds a stacked-PR detection via isStackedPullRequestBase and a new listRefs query.
  • Adds rightPanelUnavailableLabel prop to PanelLayoutControls and ensures tooltip triggers remain interactive when toggles are disabled.
  • Removes chromeVariant prop from PullRequestDetailPanel and its callers; condensed state is now derived solely from scroll position.
  • Risk: terminalUiStateStore persistence version increment triggers migration for all existing users; label data not matching the new schema is silently dropped.

Macroscope summarized 69bbbf1.

@coderabbitai

coderabbitaiBot commented Aug 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: dcb2d16b-de0c-4b21-b181-d99a892ed553

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx
@github-actions

github-actionsBot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

ProviderMetricMain baselineThis PRImpactPR ceiling
CodexTotal thread wire12.6 KiB15.1 KiB
CodexThread snapshot wire6.3 KiB7.3 KiB
CodexLive turn WebSocket wire6.3 KiB7.8 KiB
CodexLive turn WebSocket decoded51.8 KiB66.4 KiB
CodexLive turn messages1621
ClaudeTotal thread wire12.6 KiB15.1 KiB
ClaudeThread snapshot wire6.3 KiB7.3 KiB
ClaudeLive turn WebSocket wire6.3 KiB7.8 KiB
ClaudeLive turn WebSocket decoded52.7 KiB66.4 KiB
ClaudeLive turn messages1621

Baseline: unavailable · PR result: 69bbbf1 · 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: 99.9 KiB
  • Claude decoded thread snapshot: 100.6 KiB

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

@macroscopeappmacroscopeappBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

UI consistency review of the terminal drawer refresh. The migration to Button size="icon-xs" for the toolbar, the RightPanelResizeHandle/useResizableWidth reuse for the sidebar, and the tab-row treatment copied from RightPanelTabs all line up with the shared component system. Two tooltip-related consistency notes below; nothing else looked like a regression.

Posted via Macroscope — UI Consistency

Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
@macroscopeapp

macroscopeappBot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR introduces new user-facing features including terminal renaming, a resizable sidebar, and stacked pull request detection. The scope and complexity of these new capabilities, combined with unresolved findings about stale label pruning and resize persistence behavior, warrant human review.

Not approved because:

  • 2 blocking correctness issues found at or above your repo's Minimum Blocking Severity

Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more.

@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 8c3da41 to 89fac2aCompareAugust 16, 2026 01:24
Comment threadapps/web/src/terminalUiStateStore.ts

@macroscopeappmacroscopeappBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Two new findings on the terminal sidebar chrome. The two tooltip findings from the previous run (native title where the sibling tab bar / compact toolbars use the shared Tooltip, and the unreachable split-limit wording on the disabled Button) are still open and unchanged.

Posted via Macroscope — UI Consistency

Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 89fac2a to b45d74eCompareAugust 16, 2026 01:32
@maria-rcks
maria-rcksforce-pushed the ui-refresh/terminal branch 2 times, most recently from e4900e7 to 4cfb51cCompareAugust 16, 2026 01:36
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from b45d74e to 1dd5875CompareAugust 16, 2026 01:36

@macroscopeappmacroscopeappBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

UI consistency review of the terminal drawer refresh. Two new findings on the added controls; previously flagged items (sidebar toolbar overflow at the 144px min width, per-instance useResizableWidth state sharing one storage key, native title instead of the shared Tooltip) still apply and are not repeated here.

Posted via Macroscope — UI Consistency

Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
@maria-rcks
maria-rcksforce-pushed the ui-refresh/terminal branch 2 times, most recently from 6bc8da6 to 6978c5bCompareAugust 16, 2026 01:49
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch 2 times, most recently from 0437edb to 5cc755cCompareAugust 16, 2026 01:51
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 5cc755c to b73193dCompareAugust 16, 2026 01:59
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 5ea3cfa to da3f3d2CompareAugust 19, 2026 05:16
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from da3f3d2 to 9d9746aCompareAugust 19, 2026 05:32
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 9d9746a to 02917c5CompareAugust 19, 2026 05:35
@maria-rcks
maria-rcksforce-pushed the ui-refresh/terminal branch 2 times, most recently from 1a2d460 to ce2d484CompareAugust 19, 2026 05:40
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 02917c5 to bd7ac13CompareAugust 19, 2026 05:40
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Medium

if(terminalIdListsEqual(serverOrderedTerminalIds,terminalUiState.terminalIds)){

Stale custom labels remain persisted when the server and drawer terminal IDs are equal, so a label for a deleted terminal is never pruned and can be reused when that ID is allocated again. The early return skips reconcileTerminalIds, which performs the label pruning; allow reconciliation to run in this case.

🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @apps/web/src/components/ChatView.tsx around line 790:
Stale custom labels remain persisted when the server and drawer terminal IDs are equal, so a label for a deleted terminal is never pruned and can be reused when that ID is allocated again. The early return skips `reconcileTerminalIds`, which performs the label pruning; allow reconciliation to run in this case.

@cursorcursorBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 69bbbf1. Configure here.

if (dragStateRef.current === null && dragWidth !== null) {
setDragWidth(null);
}
}, [dragWidth, storedWidth]);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Resize reverts if persist fails

Medium Severity

After a resize ends, dragWidth is cleared whenever the pointer is not down. Display then falls back to storedWidth. If setStoredWidth fails (quota or write error, which useLocalStorage swallows), the panel snaps back to the old width instead of keeping the drag result. Previously in-memory width still updated after a failed persist.

Additional Locations (1)
Fix in CursorFix in Web

Reviewed by Cursor Bugbot for commit 69bbbf1. Configure here.

Comment on lines +126 to +130
const repositoryPath =
/^(.*?)\/-\/merge_requests\/\d+(?:\/|$)/iu.exec(url.pathname)?.[1] ??
/^(.*?)(?:\/pull\/\d+|\/-\/merge_requests\/\d+|\/pull-requests\/\d+|\/pullrequest\/\d+)(?:\/|$)/iu.exec(
url.pathname,
)?.[1];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Mediumlib/openPullRequestLink.ts:126

changeRequestRepositoryUrl returns null for valid Azure URLs such as https://dev.azure.com/pull/123/_git/repo/pullrequest/42, and can return a truncated repository URL for similar paths. Its non-greedy fallback stops at the first /pull/<number>-like segment instead of the final PR suffix; extract the repository path using the last recognized provider suffix.

- const repositoryPath =- /^(.*?)\/\/-\/merge_requests\/\d+(?:\/|$)/iu.exec(url.pathname)?.[1] ??- /^(.*?)(?:\/pull\/\d+|\/-\/merge_requests\/\d+|\/pull-requests\/\d+|\/pullrequest\/\d+)(?:\/|$)/iu.exec(- url.pathname,- )?.[1];+ const repositoryPath = /^(.*)(?:\/pull\/\d+|\/-\/merge_requests\/\d+|\/pull-requests\/\d+|\/pullrequest\/\d+)(?:\/|$)/iu.exec(+ url.pathname,+ )?.[1];
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @apps/web/src/lib/openPullRequestLink.ts around lines 126-130:
`changeRequestRepositoryUrl` returns `null` for valid Azure URLs such as `https://dev.azure.com/pull/123/_git/repo/pullrequest/42`, and can return a truncated repository URL for similar paths. Its non-greedy fallback stops at the first `/pull/<number>`-like segment instead of the final PR suffix; extract the repository path using the last recognized provider suffix.

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

Labels

size:XL500-999 changed lines (additions + deletions).vouch:trustedPR 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

@maria-rcks
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

feat(web): improve terminal workspace controls - #7149

Closed
maria-rcks wants to merge 17 commits into
mainfrom
ui-refresh/terminal
Closed

feat(web): improve terminal workspace controls#7149
maria-rcks wants to merge 17 commits into
mainfrom
ui-refresh/terminal

Conversation

@maria-rcks

@maria-rcksmaria-rcks commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

What changed

  • Reworks the terminal drawer controls and multi-session sidebar while retaining split groups and resize behavior.
  • Persists custom terminal names by scoped thread, prunes stale labels, and clears labels when terminals or threads disappear.
  • Adds an explicit drawer hide path and keeps single-terminal sessions free of unnecessary sidebar chrome.

Screenshots

Direct parent on the left; this PR on the right. Same viewport and copied application state.

BeforeAfter
Terminal drawer beforeTerminal drawer after
## Why

Terminal state and interaction changes need a focused review. This layer depends only on the shared chat header from #7153.

Validation

  • Terminal drawer tests
  • Terminal UI store migration, naming, cleanup, reconciliation, and sidebar tests
  • Affected-package typechecks
  • Changed-file lint and formatting checks

Stack order

  1. feat(web): unify workspace navigation #7153 workspace and navigation
  2. feat(web): redesign usage insights #7147 Usage
  3. feat(web): refresh pull request details #7148 Pull Requests
  4. feat(web): improve terminal workspace controls #7149 terminal, this PR
  5. feat(web): attach composer state drawers #7150 composer
  6. fix(server): preserve tool lifecycle identity #7151 tool lifecycle projection
  7. feat(web): collapse tool activity into one line #7152 tool activity UI

Built with GPT-5.6-sol in the Codex harness.


Note

Medium Risk
Touches persisted terminal UI state (migration v5) and server/client terminal ID reconciliation; behavior is covered by tests but wrong label pruning could affect multi-surface terminal UX.

Overview
Reworks the thread terminal drawer with a resizable session sidebar, persisted per-terminal names, and a toolbar action to hide the drawer without closing sessions.

The multi-terminal sidebar moves to the right of the viewport with a drag handle (useResizableWidth + separate localStorage keys for drawer vs panel). Width is capped so the terminal area keeps a minimum usable width. Toolbar actions switch from popover hover buttons to compact icon tooltips; drawer mode adds Hide (wired from ChatView via onHide).

Custom terminal labels are stored in terminalUiStateStore (persist v5): rename via double-click or F2, with logic so unchanged automatic titles are not saved as custom names. Labels apply in the drawer list and in ChatView composer terminal chips. Closing a terminal or pruning during reconcileTerminalIds drops stale labels; reconciliation can pass panel terminal ids so right-panel sessions keep names when drawer state syncs from the server.

Single-terminal layout keeps a floating compact toolbar only (no sidebar chrome).

Reviewed by Cursor Bugbot for commit 69bbbf1. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Improve terminal workspace controls with inline renaming, custom labels, and resizable sidebar

  • Adds inline terminal renaming (double-click or F2) in ThreadTerminalDrawer, persisting custom labels up to 80 chars in terminalUiStateStore (version bumped 4→5 with migration).
  • Introduces a resizable terminal sidebar with dynamic max-width clamping and per-context persisted widths; sidebar hides when only one terminal is open.
  • Adds onHide callback to ThreadTerminalDrawer and wires it through ChatViewContent so the drawer can request to be hidden.
  • Reworks PullRequestDetailPanel to prioritize conflict resolution in the primary action slot and adds a stacked-PR detection via isStackedPullRequestBase and a new listRefs query.
  • Adds rightPanelUnavailableLabel prop to PanelLayoutControls and ensures tooltip triggers remain interactive when toggles are disabled.
  • Removes chromeVariant prop from PullRequestDetailPanel and its callers; condensed state is now derived solely from scroll position.
  • Risk: terminalUiStateStore persistence version increment triggers migration for all existing users; label data not matching the new schema is silently dropped.

Macroscope summarized 69bbbf1.

@coderabbitai

coderabbitaiBot commented Aug 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: dcb2d16b-de0c-4b21-b181-d99a892ed553

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx
@github-actions

github-actionsBot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

ProviderMetricMain baselineThis PRImpactPR ceiling
CodexTotal thread wire12.6 KiB15.1 KiB
CodexThread snapshot wire6.3 KiB7.3 KiB
CodexLive turn WebSocket wire6.3 KiB7.8 KiB
CodexLive turn WebSocket decoded51.8 KiB66.4 KiB
CodexLive turn messages1621
ClaudeTotal thread wire12.6 KiB15.1 KiB
ClaudeThread snapshot wire6.3 KiB7.3 KiB
ClaudeLive turn WebSocket wire6.3 KiB7.8 KiB
ClaudeLive turn WebSocket decoded52.7 KiB66.4 KiB
ClaudeLive turn messages1621

Baseline: unavailable · PR result: 69bbbf1 · 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: 99.9 KiB
  • Claude decoded thread snapshot: 100.6 KiB

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

@macroscopeappmacroscopeappBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

UI consistency review of the terminal drawer refresh. The migration to Button size="icon-xs" for the toolbar, the RightPanelResizeHandle/useResizableWidth reuse for the sidebar, and the tab-row treatment copied from RightPanelTabs all line up with the shared component system. Two tooltip-related consistency notes below; nothing else looked like a regression.

Posted via Macroscope — UI Consistency

Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
@macroscopeapp

macroscopeappBot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR introduces new user-facing features including terminal renaming, a resizable sidebar, and stacked pull request detection. The scope and complexity of these new capabilities, combined with unresolved findings about stale label pruning and resize persistence behavior, warrant human review.

Not approved because:

  • 2 blocking correctness issues found at or above your repo's Minimum Blocking Severity

Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more.

@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 8c3da41 to 89fac2aCompareAugust 16, 2026 01:24
Comment threadapps/web/src/terminalUiStateStore.ts

@macroscopeappmacroscopeappBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Two new findings on the terminal sidebar chrome. The two tooltip findings from the previous run (native title where the sibling tab bar / compact toolbars use the shared Tooltip, and the unreachable split-limit wording on the disabled Button) are still open and unchanged.

Posted via Macroscope — UI Consistency

Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 89fac2a to b45d74eCompareAugust 16, 2026 01:32
@maria-rcks
maria-rcksforce-pushed the ui-refresh/terminal branch 2 times, most recently from e4900e7 to 4cfb51cCompareAugust 16, 2026 01:36
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from b45d74e to 1dd5875CompareAugust 16, 2026 01:36

@macroscopeappmacroscopeappBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

UI consistency review of the terminal drawer refresh. Two new findings on the added controls; previously flagged items (sidebar toolbar overflow at the 144px min width, per-instance useResizableWidth state sharing one storage key, native title instead of the shared Tooltip) still apply and are not repeated here.

Posted via Macroscope — UI Consistency

Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
@maria-rcks
maria-rcksforce-pushed the ui-refresh/terminal branch 2 times, most recently from 6bc8da6 to 6978c5bCompareAugust 16, 2026 01:49
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch 2 times, most recently from 0437edb to 5cc755cCompareAugust 16, 2026 01:51
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 5cc755c to b73193dCompareAugust 16, 2026 01:59
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 5ea3cfa to da3f3d2CompareAugust 19, 2026 05:16
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from da3f3d2 to 9d9746aCompareAugust 19, 2026 05:32
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 9d9746a to 02917c5CompareAugust 19, 2026 05:35
@maria-rcks
maria-rcksforce-pushed the ui-refresh/terminal branch 2 times, most recently from 1a2d460 to ce2d484CompareAugust 19, 2026 05:40
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 02917c5 to bd7ac13CompareAugust 19, 2026 05:40
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Medium

if(terminalIdListsEqual(serverOrderedTerminalIds,terminalUiState.terminalIds)){

Stale custom labels remain persisted when the server and drawer terminal IDs are equal, so a label for a deleted terminal is never pruned and can be reused when that ID is allocated again. The early return skips reconcileTerminalIds, which performs the label pruning; allow reconciliation to run in this case.

🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @apps/web/src/components/ChatView.tsx around line 790:
Stale custom labels remain persisted when the server and drawer terminal IDs are equal, so a label for a deleted terminal is never pruned and can be reused when that ID is allocated again. The early return skips `reconcileTerminalIds`, which performs the label pruning; allow reconciliation to run in this case.

@cursorcursorBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 69bbbf1. Configure here.

if (dragStateRef.current === null && dragWidth !== null) {
setDragWidth(null);
}
}, [dragWidth, storedWidth]);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Resize reverts if persist fails

Medium Severity

After a resize ends, dragWidth is cleared whenever the pointer is not down. Display then falls back to storedWidth. If setStoredWidth fails (quota or write error, which useLocalStorage swallows), the panel snaps back to the old width instead of keeping the drag result. Previously in-memory width still updated after a failed persist.

Additional Locations (1)
Fix in CursorFix in Web

Reviewed by Cursor Bugbot for commit 69bbbf1. Configure here.

Comment on lines +126 to +130
const repositoryPath =
/^(.*?)\/-\/merge_requests\/\d+(?:\/|$)/iu.exec(url.pathname)?.[1] ??
/^(.*?)(?:\/pull\/\d+|\/-\/merge_requests\/\d+|\/pull-requests\/\d+|\/pullrequest\/\d+)(?:\/|$)/iu.exec(
url.pathname,
)?.[1];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Mediumlib/openPullRequestLink.ts:126

changeRequestRepositoryUrl returns null for valid Azure URLs such as https://dev.azure.com/pull/123/_git/repo/pullrequest/42, and can return a truncated repository URL for similar paths. Its non-greedy fallback stops at the first /pull/<number>-like segment instead of the final PR suffix; extract the repository path using the last recognized provider suffix.

- const repositoryPath =- /^(.*?)\/\/-\/merge_requests\/\d+(?:\/|$)/iu.exec(url.pathname)?.[1] ??- /^(.*?)(?:\/pull\/\d+|\/-\/merge_requests\/\d+|\/pull-requests\/\d+|\/pullrequest\/\d+)(?:\/|$)/iu.exec(- url.pathname,- )?.[1];+ const repositoryPath = /^(.*)(?:\/pull\/\d+|\/-\/merge_requests\/\d+|\/pull-requests\/\d+|\/pullrequest\/\d+)(?:\/|$)/iu.exec(+ url.pathname,+ )?.[1];
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @apps/web/src/lib/openPullRequestLink.ts around lines 126-130:
`changeRequestRepositoryUrl` returns `null` for valid Azure URLs such as `https://dev.azure.com/pull/123/_git/repo/pullrequest/42`, and can return a truncated repository URL for similar paths. Its non-greedy fallback stops at the first `/pull/<number>`-like segment instead of the final PR suffix; extract the repository path using the last recognized provider suffix.

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

Labels

size:XL500-999 changed lines (additions + deletions).vouch:trustedPR 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

@maria-rcks
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

feat(web): improve terminal workspace controls - #7149

Closed
maria-rcks wants to merge 17 commits into
mainfrom
ui-refresh/terminal
Closed

feat(web): improve terminal workspace controls#7149
maria-rcks wants to merge 17 commits into
mainfrom
ui-refresh/terminal

Conversation

@maria-rcks

@maria-rcksmaria-rcks commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

What changed

  • Reworks the terminal drawer controls and multi-session sidebar while retaining split groups and resize behavior.
  • Persists custom terminal names by scoped thread, prunes stale labels, and clears labels when terminals or threads disappear.
  • Adds an explicit drawer hide path and keeps single-terminal sessions free of unnecessary sidebar chrome.

Screenshots

Direct parent on the left; this PR on the right. Same viewport and copied application state.

BeforeAfter
Terminal drawer beforeTerminal drawer after
## Why

Terminal state and interaction changes need a focused review. This layer depends only on the shared chat header from #7153.

Validation

  • Terminal drawer tests
  • Terminal UI store migration, naming, cleanup, reconciliation, and sidebar tests
  • Affected-package typechecks
  • Changed-file lint and formatting checks

Stack order

  1. feat(web): unify workspace navigation #7153 workspace and navigation
  2. feat(web): redesign usage insights #7147 Usage
  3. feat(web): refresh pull request details #7148 Pull Requests
  4. feat(web): improve terminal workspace controls #7149 terminal, this PR
  5. feat(web): attach composer state drawers #7150 composer
  6. fix(server): preserve tool lifecycle identity #7151 tool lifecycle projection
  7. feat(web): collapse tool activity into one line #7152 tool activity UI

Built with GPT-5.6-sol in the Codex harness.


Note

Medium Risk
Touches persisted terminal UI state (migration v5) and server/client terminal ID reconciliation; behavior is covered by tests but wrong label pruning could affect multi-surface terminal UX.

Overview
Reworks the thread terminal drawer with a resizable session sidebar, persisted per-terminal names, and a toolbar action to hide the drawer without closing sessions.

The multi-terminal sidebar moves to the right of the viewport with a drag handle (useResizableWidth + separate localStorage keys for drawer vs panel). Width is capped so the terminal area keeps a minimum usable width. Toolbar actions switch from popover hover buttons to compact icon tooltips; drawer mode adds Hide (wired from ChatView via onHide).

Custom terminal labels are stored in terminalUiStateStore (persist v5): rename via double-click or F2, with logic so unchanged automatic titles are not saved as custom names. Labels apply in the drawer list and in ChatView composer terminal chips. Closing a terminal or pruning during reconcileTerminalIds drops stale labels; reconciliation can pass panel terminal ids so right-panel sessions keep names when drawer state syncs from the server.

Single-terminal layout keeps a floating compact toolbar only (no sidebar chrome).

Reviewed by Cursor Bugbot for commit 69bbbf1. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Improve terminal workspace controls with inline renaming, custom labels, and resizable sidebar

  • Adds inline terminal renaming (double-click or F2) in ThreadTerminalDrawer, persisting custom labels up to 80 chars in terminalUiStateStore (version bumped 4→5 with migration).
  • Introduces a resizable terminal sidebar with dynamic max-width clamping and per-context persisted widths; sidebar hides when only one terminal is open.
  • Adds onHide callback to ThreadTerminalDrawer and wires it through ChatViewContent so the drawer can request to be hidden.
  • Reworks PullRequestDetailPanel to prioritize conflict resolution in the primary action slot and adds a stacked-PR detection via isStackedPullRequestBase and a new listRefs query.
  • Adds rightPanelUnavailableLabel prop to PanelLayoutControls and ensures tooltip triggers remain interactive when toggles are disabled.
  • Removes chromeVariant prop from PullRequestDetailPanel and its callers; condensed state is now derived solely from scroll position.
  • Risk: terminalUiStateStore persistence version increment triggers migration for all existing users; label data not matching the new schema is silently dropped.

Macroscope summarized 69bbbf1.

@coderabbitai

coderabbitaiBot commented Aug 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: dcb2d16b-de0c-4b21-b181-d99a892ed553

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx
@github-actions

github-actionsBot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

ProviderMetricMain baselineThis PRImpactPR ceiling
CodexTotal thread wire12.6 KiB15.1 KiB
CodexThread snapshot wire6.3 KiB7.3 KiB
CodexLive turn WebSocket wire6.3 KiB7.8 KiB
CodexLive turn WebSocket decoded51.8 KiB66.4 KiB
CodexLive turn messages1621
ClaudeTotal thread wire12.6 KiB15.1 KiB
ClaudeThread snapshot wire6.3 KiB7.3 KiB
ClaudeLive turn WebSocket wire6.3 KiB7.8 KiB
ClaudeLive turn WebSocket decoded52.7 KiB66.4 KiB
ClaudeLive turn messages1621

Baseline: unavailable · PR result: 69bbbf1 · 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: 99.9 KiB
  • Claude decoded thread snapshot: 100.6 KiB

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

@macroscopeappmacroscopeappBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

UI consistency review of the terminal drawer refresh. The migration to Button size="icon-xs" for the toolbar, the RightPanelResizeHandle/useResizableWidth reuse for the sidebar, and the tab-row treatment copied from RightPanelTabs all line up with the shared component system. Two tooltip-related consistency notes below; nothing else looked like a regression.

Posted via Macroscope — UI Consistency

Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
@macroscopeapp

macroscopeappBot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR introduces new user-facing features including terminal renaming, a resizable sidebar, and stacked pull request detection. The scope and complexity of these new capabilities, combined with unresolved findings about stale label pruning and resize persistence behavior, warrant human review.

Not approved because:

  • 2 blocking correctness issues found at or above your repo's Minimum Blocking Severity

Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more.

@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 8c3da41 to 89fac2aCompareAugust 16, 2026 01:24
Comment threadapps/web/src/terminalUiStateStore.ts

@macroscopeappmacroscopeappBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Two new findings on the terminal sidebar chrome. The two tooltip findings from the previous run (native title where the sibling tab bar / compact toolbars use the shared Tooltip, and the unreachable split-limit wording on the disabled Button) are still open and unchanged.

Posted via Macroscope — UI Consistency

Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 89fac2a to b45d74eCompareAugust 16, 2026 01:32
@maria-rcks
maria-rcksforce-pushed the ui-refresh/terminal branch 2 times, most recently from e4900e7 to 4cfb51cCompareAugust 16, 2026 01:36
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from b45d74e to 1dd5875CompareAugust 16, 2026 01:36

@macroscopeappmacroscopeappBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

UI consistency review of the terminal drawer refresh. Two new findings on the added controls; previously flagged items (sidebar toolbar overflow at the 144px min width, per-instance useResizableWidth state sharing one storage key, native title instead of the shared Tooltip) still apply and are not repeated here.

Posted via Macroscope — UI Consistency

Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
@maria-rcks
maria-rcksforce-pushed the ui-refresh/terminal branch 2 times, most recently from 6bc8da6 to 6978c5bCompareAugust 16, 2026 01:49
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch 2 times, most recently from 0437edb to 5cc755cCompareAugust 16, 2026 01:51
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 5cc755c to b73193dCompareAugust 16, 2026 01:59
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 5ea3cfa to da3f3d2CompareAugust 19, 2026 05:16
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from da3f3d2 to 9d9746aCompareAugust 19, 2026 05:32
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 9d9746a to 02917c5CompareAugust 19, 2026 05:35
@maria-rcks
maria-rcksforce-pushed the ui-refresh/terminal branch 2 times, most recently from 1a2d460 to ce2d484CompareAugust 19, 2026 05:40
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 02917c5 to bd7ac13CompareAugust 19, 2026 05:40
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Medium

if(terminalIdListsEqual(serverOrderedTerminalIds,terminalUiState.terminalIds)){

Stale custom labels remain persisted when the server and drawer terminal IDs are equal, so a label for a deleted terminal is never pruned and can be reused when that ID is allocated again. The early return skips reconcileTerminalIds, which performs the label pruning; allow reconciliation to run in this case.

🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @apps/web/src/components/ChatView.tsx around line 790:
Stale custom labels remain persisted when the server and drawer terminal IDs are equal, so a label for a deleted terminal is never pruned and can be reused when that ID is allocated again. The early return skips `reconcileTerminalIds`, which performs the label pruning; allow reconciliation to run in this case.

@cursorcursorBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 69bbbf1. Configure here.

if (dragStateRef.current === null && dragWidth !== null) {
setDragWidth(null);
}
}, [dragWidth, storedWidth]);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Resize reverts if persist fails

Medium Severity

After a resize ends, dragWidth is cleared whenever the pointer is not down. Display then falls back to storedWidth. If setStoredWidth fails (quota or write error, which useLocalStorage swallows), the panel snaps back to the old width instead of keeping the drag result. Previously in-memory width still updated after a failed persist.

Additional Locations (1)
Fix in CursorFix in Web

Reviewed by Cursor Bugbot for commit 69bbbf1. Configure here.

Comment on lines +126 to +130
const repositoryPath =
/^(.*?)\/-\/merge_requests\/\d+(?:\/|$)/iu.exec(url.pathname)?.[1] ??
/^(.*?)(?:\/pull\/\d+|\/-\/merge_requests\/\d+|\/pull-requests\/\d+|\/pullrequest\/\d+)(?:\/|$)/iu.exec(
url.pathname,
)?.[1];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Mediumlib/openPullRequestLink.ts:126

changeRequestRepositoryUrl returns null for valid Azure URLs such as https://dev.azure.com/pull/123/_git/repo/pullrequest/42, and can return a truncated repository URL for similar paths. Its non-greedy fallback stops at the first /pull/<number>-like segment instead of the final PR suffix; extract the repository path using the last recognized provider suffix.

- const repositoryPath =- /^(.*?)\/\/-\/merge_requests\/\d+(?:\/|$)/iu.exec(url.pathname)?.[1] ??- /^(.*?)(?:\/pull\/\d+|\/-\/merge_requests\/\d+|\/pull-requests\/\d+|\/pullrequest\/\d+)(?:\/|$)/iu.exec(- url.pathname,- )?.[1];+ const repositoryPath = /^(.*)(?:\/pull\/\d+|\/-\/merge_requests\/\d+|\/pull-requests\/\d+|\/pullrequest\/\d+)(?:\/|$)/iu.exec(+ url.pathname,+ )?.[1];
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @apps/web/src/lib/openPullRequestLink.ts around lines 126-130:
`changeRequestRepositoryUrl` returns `null` for valid Azure URLs such as `https://dev.azure.com/pull/123/_git/repo/pullrequest/42`, and can return a truncated repository URL for similar paths. Its non-greedy fallback stops at the first `/pull/<number>`-like segment instead of the final PR suffix; extract the repository path using the last recognized provider suffix.

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

Labels

size:XL500-999 changed lines (additions + deletions).vouch:trustedPR 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

@maria-rcks
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

feat(web): improve terminal workspace controls - #7149

Closed
maria-rcks wants to merge 17 commits into
mainfrom
ui-refresh/terminal
Closed

feat(web): improve terminal workspace controls#7149
maria-rcks wants to merge 17 commits into
mainfrom
ui-refresh/terminal

Conversation

@maria-rcks

@maria-rcksmaria-rcks commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

What changed

  • Reworks the terminal drawer controls and multi-session sidebar while retaining split groups and resize behavior.
  • Persists custom terminal names by scoped thread, prunes stale labels, and clears labels when terminals or threads disappear.
  • Adds an explicit drawer hide path and keeps single-terminal sessions free of unnecessary sidebar chrome.

Screenshots

Direct parent on the left; this PR on the right. Same viewport and copied application state.

BeforeAfter
Terminal drawer beforeTerminal drawer after
## Why

Terminal state and interaction changes need a focused review. This layer depends only on the shared chat header from #7153.

Validation

  • Terminal drawer tests
  • Terminal UI store migration, naming, cleanup, reconciliation, and sidebar tests
  • Affected-package typechecks
  • Changed-file lint and formatting checks

Stack order

  1. feat(web): unify workspace navigation #7153 workspace and navigation
  2. feat(web): redesign usage insights #7147 Usage
  3. feat(web): refresh pull request details #7148 Pull Requests
  4. feat(web): improve terminal workspace controls #7149 terminal, this PR
  5. feat(web): attach composer state drawers #7150 composer
  6. fix(server): preserve tool lifecycle identity #7151 tool lifecycle projection
  7. feat(web): collapse tool activity into one line #7152 tool activity UI

Built with GPT-5.6-sol in the Codex harness.


Note

Medium Risk
Touches persisted terminal UI state (migration v5) and server/client terminal ID reconciliation; behavior is covered by tests but wrong label pruning could affect multi-surface terminal UX.

Overview
Reworks the thread terminal drawer with a resizable session sidebar, persisted per-terminal names, and a toolbar action to hide the drawer without closing sessions.

The multi-terminal sidebar moves to the right of the viewport with a drag handle (useResizableWidth + separate localStorage keys for drawer vs panel). Width is capped so the terminal area keeps a minimum usable width. Toolbar actions switch from popover hover buttons to compact icon tooltips; drawer mode adds Hide (wired from ChatView via onHide).

Custom terminal labels are stored in terminalUiStateStore (persist v5): rename via double-click or F2, with logic so unchanged automatic titles are not saved as custom names. Labels apply in the drawer list and in ChatView composer terminal chips. Closing a terminal or pruning during reconcileTerminalIds drops stale labels; reconciliation can pass panel terminal ids so right-panel sessions keep names when drawer state syncs from the server.

Single-terminal layout keeps a floating compact toolbar only (no sidebar chrome).

Reviewed by Cursor Bugbot for commit 69bbbf1. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Improve terminal workspace controls with inline renaming, custom labels, and resizable sidebar

  • Adds inline terminal renaming (double-click or F2) in ThreadTerminalDrawer, persisting custom labels up to 80 chars in terminalUiStateStore (version bumped 4→5 with migration).
  • Introduces a resizable terminal sidebar with dynamic max-width clamping and per-context persisted widths; sidebar hides when only one terminal is open.
  • Adds onHide callback to ThreadTerminalDrawer and wires it through ChatViewContent so the drawer can request to be hidden.
  • Reworks PullRequestDetailPanel to prioritize conflict resolution in the primary action slot and adds a stacked-PR detection via isStackedPullRequestBase and a new listRefs query.
  • Adds rightPanelUnavailableLabel prop to PanelLayoutControls and ensures tooltip triggers remain interactive when toggles are disabled.
  • Removes chromeVariant prop from PullRequestDetailPanel and its callers; condensed state is now derived solely from scroll position.
  • Risk: terminalUiStateStore persistence version increment triggers migration for all existing users; label data not matching the new schema is silently dropped.

Macroscope summarized 69bbbf1.

@coderabbitai

coderabbitaiBot commented Aug 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: dcb2d16b-de0c-4b21-b181-d99a892ed553

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx
@github-actions

github-actionsBot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

ProviderMetricMain baselineThis PRImpactPR ceiling
CodexTotal thread wire12.6 KiB15.1 KiB
CodexThread snapshot wire6.3 KiB7.3 KiB
CodexLive turn WebSocket wire6.3 KiB7.8 KiB
CodexLive turn WebSocket decoded51.8 KiB66.4 KiB
CodexLive turn messages1621
ClaudeTotal thread wire12.6 KiB15.1 KiB
ClaudeThread snapshot wire6.3 KiB7.3 KiB
ClaudeLive turn WebSocket wire6.3 KiB7.8 KiB
ClaudeLive turn WebSocket decoded52.7 KiB66.4 KiB
ClaudeLive turn messages1621

Baseline: unavailable · PR result: 69bbbf1 · 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: 99.9 KiB
  • Claude decoded thread snapshot: 100.6 KiB

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

@macroscopeappmacroscopeappBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

UI consistency review of the terminal drawer refresh. The migration to Button size="icon-xs" for the toolbar, the RightPanelResizeHandle/useResizableWidth reuse for the sidebar, and the tab-row treatment copied from RightPanelTabs all line up with the shared component system. Two tooltip-related consistency notes below; nothing else looked like a regression.

Posted via Macroscope — UI Consistency

Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
@macroscopeapp

macroscopeappBot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR introduces new user-facing features including terminal renaming, a resizable sidebar, and stacked pull request detection. The scope and complexity of these new capabilities, combined with unresolved findings about stale label pruning and resize persistence behavior, warrant human review.

Not approved because:

  • 2 blocking correctness issues found at or above your repo's Minimum Blocking Severity

Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more.

@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 8c3da41 to 89fac2aCompareAugust 16, 2026 01:24
Comment threadapps/web/src/terminalUiStateStore.ts

@macroscopeappmacroscopeappBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Two new findings on the terminal sidebar chrome. The two tooltip findings from the previous run (native title where the sibling tab bar / compact toolbars use the shared Tooltip, and the unreachable split-limit wording on the disabled Button) are still open and unchanged.

Posted via Macroscope — UI Consistency

Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 89fac2a to b45d74eCompareAugust 16, 2026 01:32
@maria-rcks
maria-rcksforce-pushed the ui-refresh/terminal branch 2 times, most recently from e4900e7 to 4cfb51cCompareAugust 16, 2026 01:36
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from b45d74e to 1dd5875CompareAugust 16, 2026 01:36

@macroscopeappmacroscopeappBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

UI consistency review of the terminal drawer refresh. Two new findings on the added controls; previously flagged items (sidebar toolbar overflow at the 144px min width, per-instance useResizableWidth state sharing one storage key, native title instead of the shared Tooltip) still apply and are not repeated here.

Posted via Macroscope — UI Consistency

Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
@maria-rcks
maria-rcksforce-pushed the ui-refresh/terminal branch 2 times, most recently from 6bc8da6 to 6978c5bCompareAugust 16, 2026 01:49
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch 2 times, most recently from 0437edb to 5cc755cCompareAugust 16, 2026 01:51
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 5cc755c to b73193dCompareAugust 16, 2026 01:59
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 5ea3cfa to da3f3d2CompareAugust 19, 2026 05:16
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from da3f3d2 to 9d9746aCompareAugust 19, 2026 05:32
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 9d9746a to 02917c5CompareAugust 19, 2026 05:35
@maria-rcks
maria-rcksforce-pushed the ui-refresh/terminal branch 2 times, most recently from 1a2d460 to ce2d484CompareAugust 19, 2026 05:40
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 02917c5 to bd7ac13CompareAugust 19, 2026 05:40
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Medium

if(terminalIdListsEqual(serverOrderedTerminalIds,terminalUiState.terminalIds)){

Stale custom labels remain persisted when the server and drawer terminal IDs are equal, so a label for a deleted terminal is never pruned and can be reused when that ID is allocated again. The early return skips reconcileTerminalIds, which performs the label pruning; allow reconciliation to run in this case.

🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @apps/web/src/components/ChatView.tsx around line 790:
Stale custom labels remain persisted when the server and drawer terminal IDs are equal, so a label for a deleted terminal is never pruned and can be reused when that ID is allocated again. The early return skips `reconcileTerminalIds`, which performs the label pruning; allow reconciliation to run in this case.

@cursorcursorBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 69bbbf1. Configure here.

if (dragStateRef.current === null && dragWidth !== null) {
setDragWidth(null);
}
}, [dragWidth, storedWidth]);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Resize reverts if persist fails

Medium Severity

After a resize ends, dragWidth is cleared whenever the pointer is not down. Display then falls back to storedWidth. If setStoredWidth fails (quota or write error, which useLocalStorage swallows), the panel snaps back to the old width instead of keeping the drag result. Previously in-memory width still updated after a failed persist.

Additional Locations (1)
Fix in CursorFix in Web

Reviewed by Cursor Bugbot for commit 69bbbf1. Configure here.

Comment on lines +126 to +130
const repositoryPath =
/^(.*?)\/-\/merge_requests\/\d+(?:\/|$)/iu.exec(url.pathname)?.[1] ??
/^(.*?)(?:\/pull\/\d+|\/-\/merge_requests\/\d+|\/pull-requests\/\d+|\/pullrequest\/\d+)(?:\/|$)/iu.exec(
url.pathname,
)?.[1];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Mediumlib/openPullRequestLink.ts:126

changeRequestRepositoryUrl returns null for valid Azure URLs such as https://dev.azure.com/pull/123/_git/repo/pullrequest/42, and can return a truncated repository URL for similar paths. Its non-greedy fallback stops at the first /pull/<number>-like segment instead of the final PR suffix; extract the repository path using the last recognized provider suffix.

- const repositoryPath =- /^(.*?)\/\/-\/merge_requests\/\d+(?:\/|$)/iu.exec(url.pathname)?.[1] ??- /^(.*?)(?:\/pull\/\d+|\/-\/merge_requests\/\d+|\/pull-requests\/\d+|\/pullrequest\/\d+)(?:\/|$)/iu.exec(- url.pathname,- )?.[1];+ const repositoryPath = /^(.*)(?:\/pull\/\d+|\/-\/merge_requests\/\d+|\/pull-requests\/\d+|\/pullrequest\/\d+)(?:\/|$)/iu.exec(+ url.pathname,+ )?.[1];
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @apps/web/src/lib/openPullRequestLink.ts around lines 126-130:
`changeRequestRepositoryUrl` returns `null` for valid Azure URLs such as `https://dev.azure.com/pull/123/_git/repo/pullrequest/42`, and can return a truncated repository URL for similar paths. Its non-greedy fallback stops at the first `/pull/<number>`-like segment instead of the final PR suffix; extract the repository path using the last recognized provider suffix.

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

Labels

size:XL500-999 changed lines (additions + deletions).vouch:trustedPR 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

@maria-rcks
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

feat(web): improve terminal workspace controls - #7149

Closed
maria-rcks wants to merge 17 commits into
mainfrom
ui-refresh/terminal
Closed

feat(web): improve terminal workspace controls#7149
maria-rcks wants to merge 17 commits into
mainfrom
ui-refresh/terminal

Conversation

@maria-rcks

@maria-rcksmaria-rcks commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

What changed

  • Reworks the terminal drawer controls and multi-session sidebar while retaining split groups and resize behavior.
  • Persists custom terminal names by scoped thread, prunes stale labels, and clears labels when terminals or threads disappear.
  • Adds an explicit drawer hide path and keeps single-terminal sessions free of unnecessary sidebar chrome.

Screenshots

Direct parent on the left; this PR on the right. Same viewport and copied application state.

BeforeAfter
Terminal drawer beforeTerminal drawer after
## Why

Terminal state and interaction changes need a focused review. This layer depends only on the shared chat header from #7153.

Validation

  • Terminal drawer tests
  • Terminal UI store migration, naming, cleanup, reconciliation, and sidebar tests
  • Affected-package typechecks
  • Changed-file lint and formatting checks

Stack order

  1. feat(web): unify workspace navigation #7153 workspace and navigation
  2. feat(web): redesign usage insights #7147 Usage
  3. feat(web): refresh pull request details #7148 Pull Requests
  4. feat(web): improve terminal workspace controls #7149 terminal, this PR
  5. feat(web): attach composer state drawers #7150 composer
  6. fix(server): preserve tool lifecycle identity #7151 tool lifecycle projection
  7. feat(web): collapse tool activity into one line #7152 tool activity UI

Built with GPT-5.6-sol in the Codex harness.


Note

Medium Risk
Touches persisted terminal UI state (migration v5) and server/client terminal ID reconciliation; behavior is covered by tests but wrong label pruning could affect multi-surface terminal UX.

Overview
Reworks the thread terminal drawer with a resizable session sidebar, persisted per-terminal names, and a toolbar action to hide the drawer without closing sessions.

The multi-terminal sidebar moves to the right of the viewport with a drag handle (useResizableWidth + separate localStorage keys for drawer vs panel). Width is capped so the terminal area keeps a minimum usable width. Toolbar actions switch from popover hover buttons to compact icon tooltips; drawer mode adds Hide (wired from ChatView via onHide).

Custom terminal labels are stored in terminalUiStateStore (persist v5): rename via double-click or F2, with logic so unchanged automatic titles are not saved as custom names. Labels apply in the drawer list and in ChatView composer terminal chips. Closing a terminal or pruning during reconcileTerminalIds drops stale labels; reconciliation can pass panel terminal ids so right-panel sessions keep names when drawer state syncs from the server.

Single-terminal layout keeps a floating compact toolbar only (no sidebar chrome).

Reviewed by Cursor Bugbot for commit 69bbbf1. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Improve terminal workspace controls with inline renaming, custom labels, and resizable sidebar

  • Adds inline terminal renaming (double-click or F2) in ThreadTerminalDrawer, persisting custom labels up to 80 chars in terminalUiStateStore (version bumped 4→5 with migration).
  • Introduces a resizable terminal sidebar with dynamic max-width clamping and per-context persisted widths; sidebar hides when only one terminal is open.
  • Adds onHide callback to ThreadTerminalDrawer and wires it through ChatViewContent so the drawer can request to be hidden.
  • Reworks PullRequestDetailPanel to prioritize conflict resolution in the primary action slot and adds a stacked-PR detection via isStackedPullRequestBase and a new listRefs query.
  • Adds rightPanelUnavailableLabel prop to PanelLayoutControls and ensures tooltip triggers remain interactive when toggles are disabled.
  • Removes chromeVariant prop from PullRequestDetailPanel and its callers; condensed state is now derived solely from scroll position.
  • Risk: terminalUiStateStore persistence version increment triggers migration for all existing users; label data not matching the new schema is silently dropped.

Macroscope summarized 69bbbf1.

@coderabbitai

coderabbitaiBot commented Aug 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: dcb2d16b-de0c-4b21-b181-d99a892ed553

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx
@github-actions

github-actionsBot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

ProviderMetricMain baselineThis PRImpactPR ceiling
CodexTotal thread wire12.6 KiB15.1 KiB
CodexThread snapshot wire6.3 KiB7.3 KiB
CodexLive turn WebSocket wire6.3 KiB7.8 KiB
CodexLive turn WebSocket decoded51.8 KiB66.4 KiB
CodexLive turn messages1621
ClaudeTotal thread wire12.6 KiB15.1 KiB
ClaudeThread snapshot wire6.3 KiB7.3 KiB
ClaudeLive turn WebSocket wire6.3 KiB7.8 KiB
ClaudeLive turn WebSocket decoded52.7 KiB66.4 KiB
ClaudeLive turn messages1621

Baseline: unavailable · PR result: 69bbbf1 · 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: 99.9 KiB
  • Claude decoded thread snapshot: 100.6 KiB

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

@macroscopeappmacroscopeappBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

UI consistency review of the terminal drawer refresh. The migration to Button size="icon-xs" for the toolbar, the RightPanelResizeHandle/useResizableWidth reuse for the sidebar, and the tab-row treatment copied from RightPanelTabs all line up with the shared component system. Two tooltip-related consistency notes below; nothing else looked like a regression.

Posted via Macroscope — UI Consistency

Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
@macroscopeapp

macroscopeappBot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR introduces new user-facing features including terminal renaming, a resizable sidebar, and stacked pull request detection. The scope and complexity of these new capabilities, combined with unresolved findings about stale label pruning and resize persistence behavior, warrant human review.

Not approved because:

  • 2 blocking correctness issues found at or above your repo's Minimum Blocking Severity

Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more.

@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 8c3da41 to 89fac2aCompareAugust 16, 2026 01:24
Comment threadapps/web/src/terminalUiStateStore.ts

@macroscopeappmacroscopeappBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Two new findings on the terminal sidebar chrome. The two tooltip findings from the previous run (native title where the sibling tab bar / compact toolbars use the shared Tooltip, and the unreachable split-limit wording on the disabled Button) are still open and unchanged.

Posted via Macroscope — UI Consistency

Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 89fac2a to b45d74eCompareAugust 16, 2026 01:32
@maria-rcks
maria-rcksforce-pushed the ui-refresh/terminal branch 2 times, most recently from e4900e7 to 4cfb51cCompareAugust 16, 2026 01:36
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from b45d74e to 1dd5875CompareAugust 16, 2026 01:36

@macroscopeappmacroscopeappBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

UI consistency review of the terminal drawer refresh. Two new findings on the added controls; previously flagged items (sidebar toolbar overflow at the 144px min width, per-instance useResizableWidth state sharing one storage key, native title instead of the shared Tooltip) still apply and are not repeated here.

Posted via Macroscope — UI Consistency

Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx Outdated
@maria-rcks
maria-rcksforce-pushed the ui-refresh/terminal branch 2 times, most recently from 6bc8da6 to 6978c5bCompareAugust 16, 2026 01:49
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch 2 times, most recently from 0437edb to 5cc755cCompareAugust 16, 2026 01:51
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 5cc755c to b73193dCompareAugust 16, 2026 01:59
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 5ea3cfa to da3f3d2CompareAugust 19, 2026 05:16
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from da3f3d2 to 9d9746aCompareAugust 19, 2026 05:32
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 9d9746a to 02917c5CompareAugust 19, 2026 05:35
@maria-rcks
maria-rcksforce-pushed the ui-refresh/terminal branch 2 times, most recently from 1a2d460 to ce2d484CompareAugust 19, 2026 05:40
@maria-rcks
maria-rcksforce-pushed the ui-refresh/pull-requests branch from 02917c5 to bd7ac13CompareAugust 19, 2026 05:40
Comment threadapps/web/src/components/ThreadTerminalDrawer.tsx

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Medium

if(terminalIdListsEqual(serverOrderedTerminalIds,terminalUiState.terminalIds)){

Stale custom labels remain persisted when the server and drawer terminal IDs are equal, so a label for a deleted terminal is never pruned and can be reused when that ID is allocated again. The early return skips reconcileTerminalIds, which performs the label pruning; allow reconciliation to run in this case.

🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @apps/web/src/components/ChatView.tsx around line 790:
Stale custom labels remain persisted when the server and drawer terminal IDs are equal, so a label for a deleted terminal is never pruned and can be reused when that ID is allocated again. The early return skips `reconcileTerminalIds`, which performs the label pruning; allow reconciliation to run in this case.

@cursorcursorBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 69bbbf1. Configure here.

if (dragStateRef.current === null && dragWidth !== null) {
setDragWidth(null);
}
}, [dragWidth, storedWidth]);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Resize reverts if persist fails

Medium Severity

After a resize ends, dragWidth is cleared whenever the pointer is not down. Display then falls back to storedWidth. If setStoredWidth fails (quota or write error, which useLocalStorage swallows), the panel snaps back to the old width instead of keeping the drag result. Previously in-memory width still updated after a failed persist.

Additional Locations (1)
Fix in CursorFix in Web

Reviewed by Cursor Bugbot for commit 69bbbf1. Configure here.

Comment on lines +126 to +130
const repositoryPath =
/^(.*?)\/-\/merge_requests\/\d+(?:\/|$)/iu.exec(url.pathname)?.[1] ??
/^(.*?)(?:\/pull\/\d+|\/-\/merge_requests\/\d+|\/pull-requests\/\d+|\/pullrequest\/\d+)(?:\/|$)/iu.exec(
url.pathname,
)?.[1];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Mediumlib/openPullRequestLink.ts:126

changeRequestRepositoryUrl returns null for valid Azure URLs such as https://dev.azure.com/pull/123/_git/repo/pullrequest/42, and can return a truncated repository URL for similar paths. Its non-greedy fallback stops at the first /pull/<number>-like segment instead of the final PR suffix; extract the repository path using the last recognized provider suffix.

- const repositoryPath =- /^(.*?)\/\/-\/merge_requests\/\d+(?:\/|$)/iu.exec(url.pathname)?.[1] ??- /^(.*?)(?:\/pull\/\d+|\/-\/merge_requests\/\d+|\/pull-requests\/\d+|\/pullrequest\/\d+)(?:\/|$)/iu.exec(- url.pathname,- )?.[1];+ const repositoryPath = /^(.*)(?:\/pull\/\d+|\/-\/merge_requests\/\d+|\/pull-requests\/\d+|\/pullrequest\/\d+)(?:\/|$)/iu.exec(+ url.pathname,+ )?.[1];
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @apps/web/src/lib/openPullRequestLink.ts around lines 126-130:
`changeRequestRepositoryUrl` returns `null` for valid Azure URLs such as `https://dev.azure.com/pull/123/_git/repo/pullrequest/42`, and can return a truncated repository URL for similar paths. Its non-greedy fallback stops at the first `/pull/<number>`-like segment instead of the final PR suffix; extract the repository path using the last recognized provider suffix.

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

Labels

size:XL500-999 changed lines (additions + deletions).vouch:trustedPR 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

@maria-rcks