Skip to content

DO MERGE: ui fixes - #6658

Closed
maria-rcks wants to merge 1 commit into
pingdotgg:mainfrom
maria-rcks:agent/ui-workspace-refresh
Closed

DO MERGE: ui fixes#6658
maria-rcks wants to merge 1 commit into
pingdotgg:mainfrom
maria-rcks:agent/ui-workspace-refresh

Conversation

@maria-rcks

@maria-rcks maria-rcks commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator

Changes

Workspace, navigation, and Settings

  • Adds shared workspace header and page-container primitives for consistent spacing, safe-area padding, collapsed-sidebar offsets, Electron drag regions, and native window-control clearance.
  • Applies the shared header to chat, empty/onboarding states, Usage, Pull Requests, Settings, and project settings.
  • Aligns top-bar edge icons by their visible glyphs instead of their hover hit areas.
  • Standardizes readable, wide, and expanded content widths across full-page surfaces.
  • Restores the full-width Back row on Usage, Pull Requests, and Settings, using browser history with a workspace fallback.
  • Consolidates Settings, Pull Requests, and Usage into the same sidebar utility navigation while preserving the update indicator.
  • Keeps Settings connection/account controls and gives Keybindings and Diagnostics appropriately wider layouts.
  • Tightens the theme-card minimum width so the library can fit three columns again when space allows.
  • Makes New thread create directly in the currently scoped project; All projects still opens the picker, and Shift-click still creates directly.
  • Aligns sidebar pin, working/done/woke, snooze/wake, settle, and un-settle states into stable compact slots.
  • Reorganizes thread context menus with consistent icons and separators.
  • Groups path, branch, and thread ID under a single Copy submenu and separates destructive Delete.
  • Adds matching submenu chevrons, icons, and separators to both web fallback and native desktop context menus.
  • Aligns terminal/right-panel header controls and keeps disabled panel icons the same size, position, and visual weight as enabled ones.
  • Gives inline file, skill, and context chips an explicit shared height and block-SVG geometry so icons and labels remain vertically centered at every prompt font size.

Usage

  • Moves Cost/Tokens, time range, and refresh controls into the top bar.
  • Shows the active date range in the Usage breadcrumb.
  • Restores a narrower left summary with the main total and provider amounts right-aligned beside the chart.
  • Removes Raw token cost, progress bars, and the separate provider legend.
  • Labels cost as an API estimate and keeps the session count directly below the total.
  • Keeps Codex and Claude Code visible in a stable order, including zero-usage providers, with brand markers, right-aligned values, and concise shares.
  • Keeps the aggregate session total beneath the headline and adds distinct per-provider session counts beside each harness name without double-counting sessions across buckets.
  • Replaces bar charts with smooth provider area/line curves for hourly and daily views.
  • Keeps each provider independently zero-based and prevents curves or scales from overshooting spikes.
  • Adds pointer-following hover details that stay clamped within the chart.
  • Simplifies the totals section to processed tokens, cached input, uncached input, output, and cache savings.
  • Standardizes the Model/Hour/Day breakdown selector and softens table hover styling.
  • Rebuilds the Usage loading skeleton to match the final provider, chart, totals, and breakdown layout.

Pull Requests

  • Moves the Pull Requests list onto the shared workspace header/content geometry.
  • Aligns search, refresh, filters, and the right-panel toggle consistently in full and condensed headers.
  • Keeps refresh near search and shows its active state while reloading.
  • Uses the standard outlined filter control while preserving the active-filter indicator.
  • Disables the right-panel toggle until a PR is selected and explains that state in its tooltip.
  • Restores the spacious PR detail view at the top and uses the new compact view only as the sticky scrolled state.
  • Keeps the overflow menu fixed at the top right in both expanded and compact states.
  • Crossfades from repository + PR number to PR number + title when the header condenses.
  • Makes the repository label open the repository root while the PR number opens the PR.
  • Keeps Summary, Timeline, and Code in a persistent segmented tab bar.
  • Shows checks beside Summary and comments/commits plus ordering controls beside Timeline.
  • Consolidates author/update time, branches, changed-file count, and diff totals into aligned expanded and compact metadata rows.
  • Hides the author name in the compact byline while retaining the avatar and timestamp, without a separator dot.
  • Makes the head branch copyable with inline Copied feedback and gives branch names the available width with safe truncation.
  • Shrink-wraps the branch copy hover/focus target to the visible branch label instead of filling the metadata row.
  • Marks stacked PRs when the base branch is non-default and keeps base freshness/update actions beside the base branch.
  • Aligns Reviewers, Labels, and Comments using consistent rows, columns, and vertical padding.
  • Combines the conflict state and action into one filled Resolve conflicts pill with an in-place preparing state.
  • Prioritizes conflict resolution even when the viewer cannot merge, while keeping the PR's normal open-state color.
  • Keeps checkout as a split control with separate-worktree and current-repository choices.
  • Tightens action/title spacing and keeps the panel usable at narrow widths.
  • Rebuilds PR list, detail, people, timeline, and conversation skeletons to match the current layouts and use one consistent opacity.
  • Keeps the full detail skeleton until core PR data is ready, then uses tab-specific loading states.

Terminal

  • Restores the bottom terminal drawer behavior so opening one terminal does not open a right sidebar.
  • Shows the terminal sidebar only when multiple terminal sessions exist.
  • Restores compact top controls for split right, split down, new terminal, close terminal, and hide bottom drawer.
  • Centers and left-aligns the toolbar/sidebar icons consistently.
  • Makes the multi-terminal sidebar resizable and persists its width.
  • Visually groups split terminals and labels their orientation as Split right or Split down.
  • Clarifies split panes with direction-aware dividers and focus-on-click behavior.
  • Supports up to four terminals in a split group while keeping separate new terminals in their own groups.
  • Adds persistent custom terminal names through inline double-click rename.
  • Saves terminal names on Enter/blur, cancels on Escape, and removes overrides when reset or closed.
  • Shows the generated terminal name and working directory in tooltips.
  • Turns each terminal icon into a close control on hover/focus and keeps custom names available anywhere terminal labels are shown.
  • Preserves terminal layout/name state per environment and thread while cleaning stale or closed terminal state.

Timeline, tool calls, and changed files

  • Keeps one shared live Working header and timer for the active turn.
  • Shows Thinking only until the active turn produces visible content.
  • Keeps normal turn folding/timing semantics while preventing active turns from folding or reordering.
  • Keeps Worked for… attached directly to the final response while collapsed after a mid-turn steer, then moves the disclosure above its hidden activity so history expands downward; matches assistant typography with balanced divider spacing.
  • Settles completed tool activity without creating extra transient work rows.
  • Shows the latest live tool action in place with concise labels such as Running git.
  • Sources live command labels from structured tool-start payloads so the first command appears immediately and start/update/completion remain one row instead of falling back to labels such as Running Bash:.
  • Makes the full live tool row clickable so in-progress batches can be expanded as calls arrive, preserves disclosure across lifecycle updates, and adds no extra chevron or hover fill.
  • Collapses completed tool batches into expandable, action-aware summaries such as files read/changed, commands run, searches, or tools used.
  • Uses matching summary icons, colors failures clearly, and removes redundant right-side success/status icons.
  • Keeps expanded command/tool details compact while preserving raw commands and structured results.
  • Collapses concurrent subagents into one agent CTA with count, status, token total, and responsive Open/View agents copy.
  • Prevents child-agent tool activity, plan-boundary events, status-only events, and persisted Codex terminal interactions from leaking into the parent timeline.
  • Removes duplicate Worked for…, Used tool, and synthetic child-turn rows caused by terminal interaction activity.
  • Replaces the pulse/dot treatment with a stationary text-and-icon focus sweep for Thinking and live tool calls.
  • Uses continuous transform-only animation with faded edges, a clean left-side restart, themed icon highlighting, and reduced-motion fallback.
  • Compacts changed-files cards and keeps their header sticky when expanded.
  • Keeps diff totals beside the changed-file count instead of pushing them to the far edge.
  • Replaces Show files / +N more with inline representative file previews and per-file diff stats.
  • Improves long file/folder truncation, keeps stats close to names, and retains a responsive Open diff action.

Validation

  • 45 focused web timeline tests passed after the downward-expansion change
  • 155 focused web regression tests passed on the final review wave
  • Latest 137-test server/web command-lifecycle suite passed
  • 7 focused desktop tests passed
  • 10 focused shared tests passed
  • Web, desktop, contracts, and shared typechecks passed
  • Production web build passed
  • All changed files pass formatting
  • Lint has no errors; one pre-existing warning remains outside the changed lines

Built with GPT-5.6 Sol via Codex in T3 Code.


Note

Low Risk
Mostly UI layout and menu structure; scoped new-thread behavior is a small product-logic change with tests updated. No auth, data, or security surface in this diff.

Overview
Introduces WorkspacePageHeader and WorkspacePageContainer so chat, empty-thread, onboarding, settings, and project settings share one top-bar geometry (safe area, collapsed-sidebar inset, Electron drag region, native control clearance) and optional readable/wide/expanded content widths. Settings pages adopt the container widths; panel layout toggles get themed foreground styling and a customizable disabled tooltip.

Context menus gain a contract-level separatorBefore flag, wired through Electron native menus (with deduped separators) and the web fallback, which also adds submenu chevrons and a broader icon set. Thread actions are reorganized: icons on lifecycle items, path/branch/thread ID grouped under Copy, and section separators before rename, copy, and archive.

Sidebar behavior updates: New thread creates directly in the active project scope (no picker repeat); row pin/status/snooze/settle controls use consistent micro buttons and icon sizing; settings footer navigation is centralized in SidebarUtilityMenu (Back on utility pages, shared with the main sidebar chrome).

Adds SegmentedTab / segmented toggle variants for shared tab styling, tightens composer inline chip vertical alignment, and adjusts theme library card min width for three-column layouts.

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

Note

Fix UI consistency across sidebar, context menus, settings, and workspace headers

  • Introduces WorkspacePageHeader and WorkspacePageContainer components to standardize titlebar layout and content width across chat, settings, and onboarding views
  • Groups thread action menu copy actions into a 'Copy' submenu and adds icons and separators throughout; adds separatorBefore support to ContextMenuItem contracts, Electron menus, and the web fallback context menu
  • Clicking 'New Thread' while a project scope is active now creates the thread directly in that project without opening the project picker
  • Adds SegmentedTab and SegmentedTabList UI components and new segmented toggle variants for segmented control styling
  • Replaces the settings sidebar 'Back' button with SidebarUtilityMenu; back navigation now uses browser history when available
  • Fixes inline chip icon and label alignment via block display and self-centering classes

Macroscope summarized b53b569.

@coderabbitai

coderabbitai Bot commented Aug 15, 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: 473fb8d2-3b46-40ff-aa86-1a8970e217e7

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.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL 1,000+ changed lines (additions + deletions). labels Aug 15, 2026
Comment thread apps/web/src/components/chat/MessagesTimeline.tsx Outdated
Comment thread apps/web/src/session-logic.ts Outdated
Comment thread apps/web/src/components/pullRequest/PullRequestDetailPanel.tsx Outdated
Comment thread apps/web/src/components/chat/MessagesTimeline.logic.ts Outdated
Comment thread apps/web/src/components/chat/MessagesTimeline.logic.ts Outdated
@macroscopeapp

macroscopeapp Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

4 blocking correctness issues found. This PR introduces behavioral changes to thread creation with project scoping and IPC contract modifications, not just styling fixes. Multiple Medium severity findings about incorrect thread environment selection and other bugs require resolution before approval.

You can customize Macroscope's approvability policy. Learn more.

Comment thread apps/web/src/components/chat/MessagesTimeline.logic.ts Outdated

@macroscopeapp macroscopeapp Bot 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 found three items, all on lines this PR adds. Two are pointer-affordance regressions in the new terminal sidebar tabs; one is a shared-primitive choice in the pull request action slot.

Posted via Macroscope — UI Consistency

Comment thread apps/web/src/components/ThreadTerminalDrawer.tsx Outdated
Comment thread apps/web/src/components/ThreadTerminalDrawer.tsx Outdated
Comment thread apps/web/src/components/pullRequest/PullRequestDetailPanel.tsx Outdated
Comment thread apps/web/src/components/ThreadTerminalDrawer.tsx Outdated

@macroscopeapp macroscopeapp Bot 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 consistency findings in the changed web UI. The earlier notes (terminal tab cursor-pointer, conflict action as a destructive-outline Button) are addressed.

Posted via Macroscope — UI Consistency

Comment thread apps/web/src/components/pullRequest/PullRequestDetailPanel.tsx Outdated
Comment thread apps/web/src/components/chat/PanelLayoutControls.tsx Outdated

@macroscopeapp macroscopeapp Bot 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: 1 finding

The agent-spawn CTA in the chat timeline was rebuilt as a card that copies ChangedFilesCard's shell, but at the geometry this same PR moved that card away from — so the two cards now render side by side in the same timeline column with different radii and padding. Details inline.

Everything else reviewed (shared WorkspacePageHeader/WorkspacePageContainer extraction, the new SegmentedTab/segmented toggle variant, Button migrations in the sidebar, terminal drawer toolbar, and PR filter menu, and the new live-activity-focus mask utilities in index.css) keeps the primitive contracts and ownership rules intact. Earlier findings on the check-out split button, --control-icon-color on toggles, the terminal tab cursors, and the conflicts action have all been addressed.

Posted via Macroscope — UI Consistency

Comment thread apps/web/src/components/chat/MessagesTimeline.tsx Outdated

@macroscopeapp macroscopeapp Bot 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.

Three consistency findings on newly added controls. Everything flagged in earlier runs (terminal tab cursors, the hand-built check-out split button, the interactive conflict Badge, the agent-spawn card geometry, the inert --control-icon-color on the panel toggles) is resolved in this revision.

Posted via Macroscope — UI Consistency

Comment thread apps/web/src/components/pullRequest/PullRequestDetailPanel.tsx Outdated
Comment thread apps/web/src/components/ThreadTerminalDrawer.tsx Outdated
Comment thread apps/web/src/components/Sidebar.tsx Outdated
@maria-rcks maria-rcks changed the title feat(web): refresh workspace layouts and tool activity DO MERGE: ui fixes Aug 15, 2026
@maria-rcks
maria-rcks force-pushed the agent/ui-workspace-refresh branch from 4e73f84 to 03fa569 Compare August 15, 2026 18:32
Comment on lines +286 to +288
useLayoutEffect(() => {
if (hoverIndex !== null) positionTooltip();
}, [hoverIndex, positionTooltip]);

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 usage/UsageProviderChart.tsx:286

The tooltip remains positioned using stale pixel coordinates when the plot or tooltip resizes while the pointer is stationary, so --usage-tooltip-left and --usage-tooltip-top can place it clipped or outside the resized chart. positionTooltip only runs on hover changes or mousemove; observe the plot and tooltip with ResizeObserver and reposition on resize.

-  useLayoutEffect(() => {
-    if (hoverIndex !== null) positionTooltip();
-  }, [hoverIndex, positionTooltip]);
+  useLayoutEffect(() => {
+    if (hoverIndex === null) return;
+    positionTooltip();
+    const plot = plotRef.current;
+    const tooltip = tooltipRef.current;
+    if (plot === null || tooltip === null) return;
+    const observer = new ResizeObserver(positionTooltip);
+    observer.observe(plot);
+    observer.observe(tooltip);
+    return () => observer.disconnect();
+  }, [hoverIndex, positionTooltip]);
🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/web/src/components/usage/UsageProviderChart.tsx around lines 286-288:

The tooltip remains positioned using stale pixel coordinates when the plot or tooltip resizes while the pointer is stationary, so `--usage-tooltip-left` and `--usage-tooltip-top` can place it clipped or outside the resized chart. `positionTooltip` only runs on hover changes or `mousemove`; observe the plot and tooltip with `ResizeObserver` and reposition on resize.

Comment thread apps/web/src/components/chat/MessagesTimeline.tsx
@maria-rcks
maria-rcks force-pushed the agent/ui-workspace-refresh branch from 03fa569 to de48ddd Compare August 15, 2026 19:48
Comment on lines +643 to +644
(entry, index) =>
index > latestUserMessageIndex && timelineEntryTurnId(entry) === unsettledTurnId,

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 chat/MessagesTimeline.logic.ts:643

An active-turn proposed-plan is rendered above the shared Working header when it precedes the first entry whose timelineEntryTurnId matches unsettledTurnId, so the timeline order is incorrect. firstOwnedAfterUser only recognizes turn IDs, but proposed-plan entries have no turn ID; include proposed-plan entries when locating the active-turn start.

Suggested change
(entry, index) =>
index > latestUserMessageIndex && timelineEntryTurnId(entry) === unsettledTurnId,
(entry, index) =>
index > latestUserMessageIndex &&
(entry.kind === "proposed-plan" || timelineEntryTurnId(entry) === unsettledTurnId),
🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/web/src/components/chat/MessagesTimeline.logic.ts around lines 643-644:

An active-turn `proposed-plan` is rendered above the shared Working header when it precedes the first entry whose `timelineEntryTurnId` matches `unsettledTurnId`, so the timeline order is incorrect. `firstOwnedAfterUser` only recognizes turn IDs, but `proposed-plan` entries have no turn ID; include `proposed-plan` entries when locating the active-turn start.

};

function commandProgramName(command: string): string | null {
const tokens = command.trim().split(/\s+/);

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 chat/MessagesTimeline.tsx:2180

commandProgramName labels "/Applications/My Tool/bin/tool" --flag as Running My instead of Running tool, so live activity displays the wrong executable whenever its path contains spaces. Tokenize quoted arguments before extracting the basename.

Suggested change
const tokens = command.trim().split(/\s+/);
const tokens = command.trim().match(/"[^"]*"|'[^']*'|\S+/g) ?? [];
🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/web/src/components/chat/MessagesTimeline.tsx around line 2180:

`commandProgramName` labels `"/Applications/My Tool/bin/tool" --flag` as `Running My` instead of `Running tool`, so live activity displays the wrong executable whenever its path contains spaces. Tokenize quoted arguments before extracting the basename.

@macroscopeapp macroscopeapp Bot 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.

Reviewed the changed web UI for shared-primitive and styling consistency. The earlier findings on this PR (terminal toolbar radius, terminal tab cursors, resolve-conflicts button primitive, repository link cursor, settle/snooze hover parity, agent-spawn card geometry, inert --control-icon-color on toggles) all look addressed at this head. Two remaining items below, both about affordances that changed lines removed.

Also worth a look (not commented inline): summarizeChangedFileScopes and the workingStepLabel prop chain (ChatViewMessagesTimeline context) no longer have a consumer after this refresh.

Posted via Macroscope — UI Consistency

Comment on lines +2516 to +2519
"flex flex-col rounded-md px-0.5 transition-colors",
isExpandedToolGroupEntry ? "py-0" : "py-0.5",
canExpand &&
"cursor-pointer hover:bg-accent/20 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/70",
"cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/70",

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.

This row is still click-to-expand (role="button", aria-expanded, cursor-pointer), but this change drops its hover surface in the same commit that removes its chevron/status column, so an expandable tool row now has no affordance beyond the cursor — and transition-colors on the line above is left with nothing to transition. The sibling WorkGroupToggleTimelineRow keeps hover:bg-accent/20 for the same gesture in the same list, so the two expandable rows now respond differently to hover.

Suggest keeping the hover surface here:

Suggested change
"flex flex-col rounded-md px-0.5 transition-colors",
isExpandedToolGroupEntry ? "py-0" : "py-0.5",
canExpand &&
"cursor-pointer hover:bg-accent/20 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/70",
"cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/70",
"flex flex-col rounded-md px-0.5 transition-colors",
isExpandedToolGroupEntry ? "py-0" : "py-0.5",
canExpand &&
"cursor-pointer hover:bg-accent/20 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/70",

Posted via Macroscope — UI Consistency

<div key={provider} className="flex flex-col gap-1">
<div className="flex items-baseline justify-between gap-4">
<span className="flex min-w-0 items-center gap-2 text-sm text-foreground">
<ProviderMark provider={provider} className="size-4" />

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.

UsageProviderChart still encodes each provider as a distinct series color (fill/stroke from PROVIDER_PRESENTATION[provider].color), but this refresh removes both keys to it: the per-provider share bar that painted that color here, and UsageChartLegend from the chart header. The hover tooltip lists providers with monochrome brand marks only, so nothing on the page maps a colored line back to a provider.

Smallest fix is to carry the series color on this row, which is now the only per-provider list beside the chart:

Suggested change
<ProviderMark provider={provider} className="size-4" />
<span
aria-hidden
className="size-1.5 shrink-0 rounded-full"
style={{ backgroundColor: PROVIDER_PRESENTATION[provider].color }}
/>
<ProviderMark provider={provider} className="size-4" />

Posted via Macroscope — UI Consistency

@maria-rcks
maria-rcks force-pushed the agent/ui-workspace-refresh branch from de48ddd to b53b569 Compare August 16, 2026 01:09
@github-actions github-actions Bot added size:XL 500-999 changed lines (additions + deletions). and removed size:XXL 1,000+ changed lines (additions + deletions). labels Aug 16, 2026
@maria-rcks

Copy link
Copy Markdown
Collaborator Author

Superseded by #7153, which preserves this PR's workspace/navigation diff as the bottom layer of the review stack. The remaining categories are split into #7147, #7148, #7149, #7150, #7151, and #7152. Closing this fork-head copy because GitHub cannot add fork pull requests to native stacks; its discussion remains here for reference.

@maria-rcks maria-rcks closed this Aug 16, 2026
if (isMobile) setOpenMobile(false);
if (scopedProjectGroup) {
void newThreadContext.handleNewThread(
scopeProjectRef(scopedProjectGroup.environmentId, scopedProjectGroup.id),

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 components/Sidebar.tsx:3312

When a scoped logical project has members in multiple environments, this branch always creates the thread with scopedProjectGroup.environmentId and scopedProjectGroup.id, so a thread or draft opened in another member environment is silently created in the representative environment instead of the current context. Resolve the contextual member project ref (as the command-palette path does) before falling back to the group's representative ref.

🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/web/src/components/Sidebar.tsx around line 3312:

When a scoped logical project has members in multiple environments, this branch always creates the thread with `scopedProjectGroup.environmentId` and `scopedProjectGroup.id`, so a thread or draft opened in another member environment is silently created in the representative environment instead of the current context. Resolve the contextual member project ref (as the command-palette path does) before falling back to the group's representative ref.

@cursor cursor Bot 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 b53b569. Configure here.

void newThreadContext.handleNewThread(
scopeProjectRef(scopedProjectGroup.environmentId, scopedProjectGroup.id),
);
return;

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.

Scoped new thread ignores context

Medium Severity

When the sidebar is scoped to a project group, New thread always creates against the group representative via scopedProjectGroup.environmentId / id. That skips the contextual member selection used elsewhere (buildSidebarProjectPickerEntries / startNewThreadFromContext), so in mixed local/remote groups a thread opened on a non-representative member can spawn the new draft in the wrong environment.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit b53b569. Configure here.

@macroscopeapp macroscopeapp Bot 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 found five issues, all in the newly added shared contracts: two new abstractions land without any call site, the new Toggle segmented sizes lose their font size at sm and up, and two smaller ownership/redundancy items. Details inline.

Posted via Macroscope — UI Consistency

{
id: "archive",
label: "Archive thread",
icon: "folder",

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.

archive now resolves to the same folder glyph as the new copy-path child (line 115), so the web fallback menu shows one icon for both Archive thread and Copy > Path in the same popup. Lucide's archive isn't in contextMenuFallback.ts's ICON_PATHS yet, so the fix is an entry there plus icon: "archive" here — the app already uses ArchiveIcon for this action in the settings nav.

Posted via Macroscope — UI Consistency

render={
<Toggle
className="shrink-0 [-webkit-app-region:no-drag]"
className="shrink-0 text-foreground [-webkit-app-region:no-drag]"

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.

text-foreground restates what the primitive already owns: toggleVariants' ghost variant is border-transparent text-foreground …, and when a theme is active index.css (html[data-theme-id] [data-panel-layout-controls] [data-slot="toggle"], … [data-slot="tooltip-trigger"]) sets color at higher specificity than a utility class. So the added class changes nothing on any of the three toggles in this file, in either theme mode.

Same for rightPanelUnavailableLabel (lines 15 and 30): no caller passes it and the default is the literal it replaced. Suggest dropping both and letting the variant plus the themed rule keep owning the tone.

Posted via Macroscope — UI Consistency

);
}

function SegmentedTab({

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.

Nothing at this head imports SegmentedTab/SegmentedTabList (nor the segmented / segmented-compact toggle sizes added for them), while the hand-rolled segmented groups this primitive mirrors are untouched — usage/UsagePage.tsx still builds them from raw buttons (flex rounded-md border border-border with per-button first:rounded-s-*, bg-muted text-foreground / text-muted-foreground hover:text-foreground) at both the window picker and the cost/tokens toggle.

A shared control with no consumer can't be validated against a real surface and leaves two competing segmented looks in the tree. Suggest migrating at least one of those groups here, or landing the primitive together with its first call site.

Posted via Macroscope — UI Consistency

}

/** Keeps an icon glyph on the content edge while its larger hit target extends outward. */
export function WorkspacePageHeaderEdgeControl({

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.

WorkspacePageHeaderEdgeControl is exported but never rendered at this head, so the -me-[7px] nudge it encodes has no call site that pins it to a real header edge. Suggest dropping it until a header needs the alignment (or adding that consumer in this PR) so the magic offset stays verifiable.

Posted via Macroscope — UI Consistency

Comment on lines +21 to +24
segmented:
"h-6 min-w-0 rounded-md px-2.5 text-xs before:rounded-[calc(var(--radius-md)-1px)]",
"segmented-compact":
"h-5 min-w-0 rounded-md px-2 text-[11px] before:rounded-[calc(var(--radius-md)-1px)]",

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.

The base toggle class carries text-base sm:text-sm. tailwind-merge only drops the unprefixed text-base when a size adds text-xs, so sm:text-sm survives and wins from 40rem up — both new sizes render 14px text on desktop and segmented-compact loses its text-[11px] distinction entirely (only the 20px vs 24px height would differ). Button's xs size spells out both breakpoints (text-sm sm:text-xs) for exactly this reason.

Suggested change
segmented:
"h-6 min-w-0 rounded-md px-2.5 text-xs before:rounded-[calc(var(--radius-md)-1px)]",
"segmented-compact":
"h-5 min-w-0 rounded-md px-2 text-[11px] before:rounded-[calc(var(--radius-md)-1px)]",
segmented:
"h-6 min-w-0 rounded-md px-2.5 text-xs sm:text-xs before:rounded-[calc(var(--radius-md)-1px)]",
"segmented-compact":
"h-5 min-w-0 rounded-md px-2 text-[11px] sm:text-[11px] before:rounded-[calc(var(--radius-md)-1px)]",

Posted via Macroscope — UI Consistency

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

Labels

size:XL 500-999 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant