Skip to content

feat(mcp): configure existing conversations

MacroscopeApp / Macroscope - UI Consistency failed Aug 30, 2026 in 2m 50s

UI Consistency: 1 issue found

Finding

Shared markdown renderer falls back to the globally active environment

  • apps/web/src/components/ChatMarkdown.tsx — the renderer now resolves its environment via useActiveEnvironmentId() and feeds that into serverEnvironment.configValueAtom and useOpenInPreferredEditor. The adjacent preparedConnection and openFileInPanel still use threadRef.environmentId, so the open-in-editor RPC and the availableEditors capability read one environment's server config while the file paths come from another. The canUseMarkdownFileShellActions local-exec gate was removed at the same time, so onOpen is now passed unconditionally.
  • apps/web/src/components/pullRequest/PullRequestMarkdown.tsx — the environmentId={environmentId} pass-through was dropped, leaving a pull request panel (a multi-environment surface) rendering the shared renderer with no explicit scope while still declaring an unused environmentId prop.

Both locations were commented inline.

Not flagged

  • New thread-details panel primitives (threadDetailsPanelStyles.ts, ThreadDetailsPrRow, ThreadRelationshipsControl, ThreadAutomationsPanel) consistently route through Button, Select, Menu, Tooltip, and shared row/split class constants; displayMode="panel" variants extend the existing controls rather than reconstructing them.
  • The lineage "Show N more" raw <button> mirrors the pre-existing sidebar affordance of the same name, and the queued-run grip is a drag handle — neither is a reconstruction of a core primitive.
  • V2ItemInspector and ThreadDetailsPrRow both take explicit environmentId scope for their environment-gated reads.
  • No apps/web/src/**/*.css changes in this diff, so the CSS ownership, theme-variant, and emitted-selector rules had nothing to evaluate.</AC_summary>

Details

Note

Your check run agent prompt is: .macroscope/check-run-agents/ui-consistency.md
More information about how Check Run Agents work can be found in our Help Center.

Method

The diff between the merge base and the head is very large (909 files, ~186k additions), so review was narrowed to the check's include patterns and to the rules that the changed code actually exercises:

  1. git_diff scoped to apps/web/src/**/*.css — empty, ruling out the CSS/Tailwind ownership, theme-variant, and emitted-selector sections.
  2. git_diff scoped to apps/web/src/components/chat/** for the new panel and timeline surfaces, checking shared-primitive usage, variant extraction, and accessibility preservation.
  3. Targeted review of the environment-routing rule across shared renderers (ChatMarkdown, V2ItemInspector, V2LifecycleRow, ThreadDetailsPrRow) and their new/changed call sites.
  4. git_grep at the head commit to confirm the reported state is the head state, not an artifact of the diff direction, and git_log on ChatMarkdown.tsx over the range to confirm the change was made by commits on this branch.

Evidence for the finding

At head, apps/web/src/components/ChatMarkdown.tsx:

1633  const preparedConnection = usePreparedConnection(threadRef?.environmentId ?? null);
1634  const environmentId = useActiveEnvironmentId();
1635  const serverConfig = useAtomValue(serverEnvironment.configValueAtom(environmentId));
1636  const openInPreferredEditor = useOpenInPreferredEditor(
1637    environmentId,
1638    serverConfig?.availableEditors ?? [],
1639  );

The merge-base version resolved const environmentId = threadRef?.environmentId ?? explicitEnvironmentId ?? null; and gated shell actions with canUseMarkdownFileShellActions(environmentId, remoteOpen.state.mode, remoteOpen.isResolved). Both were removed, along with the environmentId?: EnvironmentId prop documented as "Environment that owns non-thread markdown, such as a pull request panel."

PullRequestMarkdown.tsx still declares environmentId: EnvironmentId in its props but no longer forwards it, which is the call site the removed prop existed for.

Verification gates

No Tailwind/selector transformation or theme-variant change is present, so emitted-CSS inspection is not applicable. The behavioral change here (which environment an RPC targets, and whether a capability gate runs) is the kind that warrants a focused test — there is currently no test covering environment scope for ChatMarkdown's file actions, since ChatMarkdown.test.tsx was reduced to orderedListGutterStyle only in this diff.


🔍 Agent activity — 14 tool calls

1. git_tools — 5e63aea..94b0c5834ddf9779e509cd536b2e3a3492b98675

💭 This diff is huge and seems to target a different base branch, pulling in unrelated changes. I want to narrow it down to just the files in apps/web/src, so I'll retry with a path filter and stat-only mode since that flag seemed to be ignored the first time.

2. git_tools — apps/web/src/** 5e63aea..94b0c5834ddf9779e509cd536b2e3a3492b98675

💭 This diff is enormous, 35k lines just in apps/web/src, which seems unusual for what's described as a configuration PR. I suspect this stacked branch is picking up unrelated work, so I want to pull the actual PR metadata and file list to understand the true scope before diving in.

3. github_api_read_only — repos/{owner}/{repo}/pulls/{pull_number}

💭 This PR is massive—909 files with 186k additions, including a large V2 orchestration migration, so reviewing everything at full depth isn't feasible. I'll focus strategically on high-signal areas: new UI files in apps/web/src, index.css changes, thread details panel styles, and markdown renderers with environment routing.

4. git_tools — apps/web/src/**/*.css 5e63aea..94b0c5834ddf9779e509cd536b2e3a3492b98675

💭 No CSS changes, so that rules out the theme sections. Now I need to find which .ts/.tsx files changed under apps/web/src — the compare endpoint gives all 909 files, which isn't practical, and git_log by path isn't quite right either. Let me think about using a more targeted approach to list just the changed files there. I'll try scoping the diff to apps/web/src/components/chat/** with no_context, since I know the new files involved are threadDetailsPanelStyles.ts and ThreadDetailsPrRow.tsx — worth retrying stat_only with that narrower path to see if it behaves better.

5. git_tools — apps/web/src/components/chat/** 5e63aea..94b0c5834ddf9779e509cd536b2e3a3492b98675

💭 Given the scope, I should prioritize scanning the concrete source files already gathered—things like threadDetailsPanelStyles, ThreadDetailsPrRow, ThreadRelationshipsControl, QueuedRunsControl, V2ItemInspector, V2LifecycleRow, TimelineSystemDivider, and ThreadAutomationsPanel—to spot actual UI-consistency violations rather than trying to cover everything. I'm checking ThreadRelationshipsControl.tsx's "Show N more" row and noticing it's a raw button that hand-copies hover-surface styling instead of using the shared Button component with THREAD_DETAILS_PANEL_LINK_ROW_CLASS, which every other row in the file relies on—this also drops the focus-visible ring that Button normally provides, making it a solid finding. Now I'm moving on to check QueuedRunsControl for similar issues. The apple-touch-icon path mismatch doesn't seem like a UI-consistency rule violation. Turning to environment-scoped rendering, I check that V2ItemInspector properly resolves its environment from explicit scope via props, which looks correct. Then I notice the diff stripped out ChatMarkdown tests around canUseMarkdownFileShellActions, which hints that ChatMarkdown's environment-scoped action handling may have changed in a way worth investigating further. I also confirm ThreadDetailsPrRow explicitly resolves its environment via useServerConfigs().get(environmentId), which looks fine. Now I want to dig into the actual ChatMarkdown.tsx diff to see how it handles environment scoping.

6. git_tools — apps/web/src/components/ChatMarkdown.tsx 5e63aea..94b0c5834ddf9779e509cd536b2e3a3492b98675

💭 This is a major finding: ChatMarkdown now resolves environment from useActiveEnvironmentId() instead of the thread/explicit environment fallback, which is exactly the environment-routing violation the rules warn against in shared renderers—it derives environment ID, pulls server config for it, and sets up a preferred-editor opener that performs a server request tied to that environment. The mismatch is real: file paths still come from threadRef's environment while the editor targeting comes from the active one, so multi-environment surfaces like PR panels could send one environment's paths to another environment's server. The environmentId prop for non-thread markdown was also removed, cutting off the ability for PR panel call sites to pass explicit scope. This looks like a solid, in-scope finding in ChatMarkdown.tsx, though I want to double check whether this fallback removal is actually introduced by the PR's changed lines versus being an artifact of comparing against an older merge base. Given the enormous diff size (274 commits, 909 files) and the "dirty" mergeable state, I'm now suspicious that some of these apparent regressions—like the thread-transfer-report workflow and ChatMarkdown feature removal—might just reflect the branch being based on a stale point rather than genuine changes made in this PR. I want to verify by checking the git log on ChatMarkdown.tsx to pin down exactly when the active-environment fallback logic was introduced relative to this branch's history.

7. git_tools — apps/web/src/components/ChatMarkdown.tsx 5e63aea..94b0c5834ddf9779e509cd536b2e3a3492b98675

💭 These commits on the PR branch show it actively reconciled main's markdown features, but ends up using useActiveEnvironmentId(). I should check the head file to confirm the current content.

8. git_tools — useActiveEnvironmentId

💭 This confirms finding #1: ChatMarkdown pulls the editor-open environment from the globally active environment while the preview path correctly uses threadRef.environmentId, so the RPC target and available editors come from one environment while file paths and thread come from another—a clear split I need to flag. I'm now locating the exact diff line (1634 in the head file, RIGHT side) in ChatMarkdown.tsx to attach an inline review comment. But I'm worried the PR's diff base isn't what I'm comparing against—the review head SHA differs from what's actually shown to GitHub, so the line might not be part of the diff GitHub expects, which could make the API reject an inline comment. I'll try posting the inline comment anyway and fall back to a top-level review body if it errors, then move on to checking the second finding around the "Show N more" behavior.

9. git_tools — Show {Math.min

💭 The sidebar already has an identical "Show N more" button pattern, so flagging this as a raw button would be a weak, inconsistent finding — I'll drop it. My main finding remains the ChatMarkdown environment fallback, so I want to double-check whether removing the environmentId prop affects any call sites that were passing it. At merge-base, environmentId existed specifically to mark non-thread markdown owners like a pull request panel, but that prop is gone at head. I need to verify whether PR panel call sites still render ChatMarkdown correctly without a threadRef.

10. git_tools — <ChatMarkdown

11. git_tools — ChatMarkdown

12. browse_code — apps/web/src/components/pullRequest/PullRequestMarkdown.tsx

💭 I found a concrete issue: the environmentId prop is received but unused. Also, the guard canUseMarkdownFileShellActions was removed — at head, onOpen is now always passed unconditionally, so remote environments show "Open in editor" without the local-exec gate, which is a capability-gating violation worth flagging. I want to note two spots: the active-environment fallback in ChatMarkdown.tsx around line 1634, and a call site in PullRequestMarkdown.tsx around line 36 that uses the shared markdown renderer without explicit environment scope — though I should double-check whether PullRequestMarkdown.tsx is actually part of this PR's diff before citing it.

13. git_tools — apps/web/src/components/pullRequest/PullRequestMarkdown.tsx 5e63aea..94b0c5834ddf9779e509cd536b2e3a3492b98675

💭 I've confirmed both lines are part of the changed lines, so I'll go ahead and post the review targeting ChatMarkdown.tsx line 1634 and PullRequestMarkdown.tsx line 36, though there's a risk the actual diff might not match exactly, in which case I'll fall back. Now I'm drafting the first comment about the env-scoped editor RPC issue. Since fixing it properly means restoring a cross-file prop and touches multiple hunks, I've decided against providing an inline diff for either comment, sticking to plain descriptions per the "no diff for cross-file/multi-hunk" rule. Now I'll go ahead and post both comments.

14. modify_pr — ## UI Consistency: 1 issue found ChatMarkdown is a shared renderer used by chat threads, review annotations, and the pull request panel. At this head it resolves the environment for its editor RPC and capability read from the globally active environment instead of the markdown's own scope, and the explicit environmentId prop that let non-thread call sites supply that scope was removed. Details inline.


Agent Credits: 368 credits

Token usage: 24 uncached input · 2,859,152 cache-read input · 292,179 cache-write input · 9,772 output
Agent Credits may also include non-token charges from external tools such as web research.