Skip to content

cmux next: a quoted or out-of-range bare #N stays text - #27290

Merged
teamleaderleo merged 4 commits into
feat-cmux-nextfrom
msg-render-bare-refs
Oct 29, 2026
Merged

teamleaderleo merged 4 commits into
feat-cmux-nextfrom
msg-render-bare-refs

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Leo: "these auto render to the pr instead of just #1 #2...".

An agent reply that quoted his "what is #1 / #2" turned each bare number into a chip for cmux's real (and unrelated) pull requests #1 and #2. The cause is rule d in conversation/bareReferences.ts: a bare #N with no other evidence links to the chat folder's repository, whatever N is.

Two changes:

  • Quotes link no bare #N. A blockquote renders with linkBareReferences: false (new InlineOptions field, Markdown.tsx). The quote's options object is memoized per opts, so memoized blocks don't redraw. owner/repo#N, GitHub addresses and commits still link inside a quote. Inline code and code blocks already never linked, and bare-pr-refs.test.tsx covers that.
  • Rule 4: a bare #N must fit the chat's number range. Rules c and d now only consider a candidate repository when N has at least as many digits as the smallest number the chat named in that repository. A cmux chat that named feat(agent-pane): make sub-session cards disclosure rows #27262 therefore doesn't read "Fix find focus and align search overlay #1" as a cmux pull request. If the folder's repository is out of range, rule d doesn't apply: the App's pull request cache has to confirm one of the chat's other linked repositories, or N stays text. A repository the chat never named a number in has no range, so Leo's 2026-10-20 behaviour (a bare #634 in a fresh chat links to the folder's repository) still holds. The smallest number per repository is tracked as each row is read (O(1) per named reference), so streaming adds no per-row work.

Rules a and b don't change. A number the turn or an earlier turn named as owner/repo#N or as an address is still a chip, whatever its size.

Risk: a chat that named only large numbers in a repository and then means one of its small, old PRs by bare number will show it as text. An explicit owner/repo#N still links it.

Gallery: transcript → github-references-quoted-numbers.

Changelog

Tests

Red at base (test commit 808d374 on 621568b), cmux-ci test --setup webviews -- bash -c 'cd webviews && bun test test/bare-ref-repo.test.tsx test/bare-pr-refs.test.tsx': 16 pass, 2 fail. Both new tests got extra #1/#2 chips pointing at manaflow-ai/cmux/pull/1 and /pull/2 (run 40835284976).

Green at head c2605c9, same command: 19 pass, 0 fail (run 40835736342). The added rule-4 test checks that, with the folder's repository out of range, only the cache's answer links a number.

scripts/web-lint.sh and python3 scripts/cmux-next/prepush-gate.py pass.

Observed / Not run

  • Observed: the bun suites above on Linux CI via cmux-ci.
  • Not run: the gallery state hasn't been captured yet, and the app hasn't been launched. This is a webview-only change.
  • Overlap: cmux next: links in the agent chat show their site's icon #27167 (lucasr1b) touches bare-ref-repo.test.tsx and transcript.gallery.ts, so a prompt's pasted PR addresses can become chips. The new tests count only bare # chips where that matters, so they hold whichever PR lands first.

🤖 Generated with Claude Code

Agent session: agent session


Summary by cubic

Stops bare #N references in agent transcript replies from auto-linking to unrelated pull requests. A quoted "#1" or "#2" and numbers smaller than any the chat named in a repository now render as plain text.

  • Blockquotes link no bare #N; owner/repo#N, addresses, and commits still link inside quotes.
  • A bare #N links to the folder's repository only when N is as long as the smallest number the chat named in that repository; otherwise the app's pull request cache must confirm another linked repository.
  • A chat that named only large numbers in a repository will show its small old PRs as text; owner/repo#N still links them.

Changelog

Tests

  • Red at base (2 fails, extra #1/#2 chips pointing at cmux PRs); green at head (19 pass), with web lint and the prepush gate passing.
  • The rule-4 test checks that, with the folder's repository out of range, only the cache's answer links a number; the github-references-quoted-numbers gallery state covers the quote and prose cases.
  • The new tests count only bare # chips, so the overlapping PR cmux next: links in the agent chat show their site's icon #27167, which chips pasted PR addresses, doesn't break them.

Written for commit 3ff0477. Summary will update on new commits.

View guided diff Turn on auto-fix

teamleaderleo and others added 3 commits October 29, 2026 00:24
Leo: "these auto render to the pr instead of just #1 #2...". Red at base.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-9131aa102699be06c366
Leo: "these auto render to the pr instead of just #1 #2...". A reply quoting
"what is #1 / #2" drew cmux#1 and cmux#2 chips.

- A blockquote links no bare #N (owner/repo#N and addresses still link).
- Rule 4: rules c and d take a candidate only when N is as long as the smallest
  number the chat named in it; out of the folder's range, only the App's pull
  request cache can link N, else it is text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-9131aa102699be06c366
A prompt's pasted pull request address may draw as a chip too (#27167).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-9131aa102699be06c366
@teamleaderleo teamleaderleo added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 29, 2026
@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review 3ff0477: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr27290 -f ref=msg-render-bare-refs -f platform=macos -f backend_mode=local

Unclear: web / react-apps-check failed: no known signature; failed step: Check webview test shards.

CI failed on 3ff04772a1 (run 40843346687 attempt 1): 1 code, 1 unknown.

Job Verdict Why
web / react-apps-base-check (2) code a web test failed
web / react-apps-check unknown no known signature; failed step: Check webview test shards

Failures:

  • seen on other PRs rowSummary.test.tsx no description line on any Settings page is over 60 characters, in any language: failed (job)
  • seen on other PRs rowSummary.test.tsx every schema summary fits 60 characters in every language: failed (job)
  • seen on other PRs thread-minimap-left-rail-stays.test.ts webkit: an open card follows its rail on every painted inspector and resize frame at 1084px: failed (job)
Matched log lines
web / react-apps-base-check (2): (fail) no description line on any Settings page is over 60 characters, in any language [15295.24ms]

Not re-run automatically: web / react-apps-base-check (2), web / react-apps-check are not machine failures.

Written by scripts/ci/classify_failures.py (ci-failure-attribution.yml); signatures are its SIGNATURES table. A machine verdict is the runner's fault, not this PR's; yours means the failing file is one this PR changes, also red on main that main's latest full suite fails the same way, seen on other PRs that it failed on another pull request's run lately.

red: cmux-next checks (god files, concurrency, crash safety, l10n); no finished base run on 66f4014 to compare; do not merge until green; see lane-rules
red: web / Web status; base red: the same failure on the base 66f4014; does not block
red: web / react-apps-base-check (2); no finished base run on 66f4014 to compare; do not merge until green; see lane-rules
red: web / react-apps-check; base red: the same failure on the base 66f4014; does not block

Gallery before/after for 3ff0477: 16 states rendered, 3 images differ, 2224 more touched states not rendered. Images are in the run's artifact, not on this public PR.

gh run download 40843392753 -R manaflow-ai/cmux -n gallery-advisory-27290-3ff04772a137d706329c4cc1494d89193b6c0356 (then read gallery-review.json)

States
State Theme Status Diff Picked by
agent-pane.inline-media/before-after Apple System Colors Light unchanged 0% own Markdown.tsx
agent-pane.inline-media/before-after Apple System Colors unchanged 0% own Markdown.tsx
agent-pane.inline-media/labelled-lines Apple System Colors Light unchanged 0% own Markdown.tsx
agent-pane.inline-media/labelled-lines Apple System Colors unchanged 0% own Markdown.tsx
agent-pane.inline-media/path-in-sentence Apple System Colors Light unchanged 0% own Markdown.tsx
agent-pane.inline-media/path-in-sentence Apple System Colors unchanged 0% own Markdown.tsx
agent-pane.inline-media/pr-media Apple System Colors Light unchanged 0% own Markdown.tsx
agent-pane.inline-media/pr-media Apple System Colors unchanged 0% own Markdown.tsx
agent-pane.inline-media/pr-media-pair Apple System Colors Light unchanged 0% own Markdown.tsx
agent-pane.inline-media/pr-media-pair Apple System Colors unchanged 0% own Markdown.tsx
agent-pane.inline-media/web-image Apple System Colors Light unchanged 0% own Markdown.tsx
agent-pane.inline-media/web-image Apple System Colors unchanged 0% own Markdown.tsx
agent-pane.inline-media/video-thumbnail Apple System Colors Light unchanged 0% own Markdown.tsx
agent-pane.inline-media/video-thumbnail Apple System Colors unchanged 0% own Markdown.tsx
agent-pane.inline-media/video-hovered Apple System Colors Light unchanged 0% own Markdown.tsx
agent-pane.inline-media/video-hovered Apple System Colors unchanged 0% own Markdown.tsx
agent-pane.shell-math/transcript Apple System Colors Light unchanged 0% own Markdown.tsx
agent-pane.shell-math/transcript Apple System Colors unchanged 0% own Markdown.tsx
agent-pane.time-hover/transcript Apple System Colors Light unchanged 0% own Markdown.tsx
agent-pane.time-hover/transcript Apple System Colors unchanged 0% own Markdown.tsx
agent-pane.transcript/github-references-quoted-numbers Apple System Colors Light new 0% own BareReferenceChip.tsx
agent-pane.transcript/github-references-quoted-numbers Apple System Colors new 0% own BareReferenceChip.tsx
agent-pane.transcript/conversation Apple System Colors Light unchanged 0% own BareReferenceChip.tsx
agent-pane.transcript/conversation Apple System Colors unchanged 0% own BareReferenceChip.tsx
agent-pane.transcript/footer-actions-left Apple System Colors Light unchanged 0% own BareReferenceChip.tsx
agent-pane.transcript/footer-actions-left Apple System Colors unchanged 0% own BareReferenceChip.tsx
agent-pane.transcript/footer-actions-right Apple System Colors Light unchanged 0% own BareReferenceChip.tsx
agent-pane.transcript/footer-actions-right Apple System Colors unchanged 0% own BareReferenceChip.tsx
agent-pane.transcript/github-references Apple System Colors Light unchanged 0% own BareReferenceChip.tsx
agent-pane.transcript/github-references Apple System Colors unchanged 0% own BareReferenceChip.tsx
agent-pane.transcript/github-references-other-repo Apple System Colors Light changed 0.789% own BareReferenceChip.tsx
agent-pane.transcript/github-references-other-repo Apple System Colors unchanged 0% own BareReferenceChip.tsx

Pick other states with a Gallery: entry.id, entry.id/variant line in the PR body.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Bead cx-e1mvlk created for this PR by the cmux coordinator.

@blacksmith-sh

blacksmith-sh Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Found 7 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmpn6qieheo/summary-fail.json (live):/summary-fail.json (live): View Logs
/tmp/tmpw0atu3u1/summary-missing.json (live):/summary-missing.json (live): View Logs
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows/
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows
View Logs
[new_workspaces] the window draws no frames/[new_workspaces] the window draws no frames View Logs
[tabs] debug.tab_switch timed 0 of 40 switches/
[tabs] debug.tab_switch timed 0 of 40 switches
View Logs
[tabs] the window draws no frames/[tabs] the window draws no frames View Logs
test_the_repository_highlights_validate (main.DigestTests.test_the_repository_highl
ights_validate)/
test_the_repository_highlights_validate (main.DigestTests.test_the_repository_highl
ights_validate)
View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

…bare-refs

# Conflicts:
#	webviews/src/agent-session/acpmux/conversation/Markdown.tsx
@teamleaderleo
teamleaderleo merged commit e7ed602 into feat-cmux-next Oct 29, 2026
164 of 173 checks passed
@teamleaderleo
teamleaderleo deleted the msg-render-bare-refs branch October 29, 2026 09:29
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex-review-box/gpt-6-astra high, lane-place): SHIP at 3ff0477

SHIP

No actionable findings. Tests could not run because Bun and dependencies are unavailable in the box.

@github-actions

Copy link
Copy Markdown
Contributor

The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/40851476637 at c89a975 failed: cmux-next checks (god files, concurrency, crash safety, l10n).
Those jobs last passed at ff35fb4. This pull request is one of 5 merged since: #27344, #27290, #27263, #27311, #27273.
If the failure is in your change, fix forward on feat-cmux-next. Pull requests run only the tiers their paths reach (docs/ci/cmux-next-tiers.md); label a batch PR full-ci to run them all before merging.

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown
Contributor

The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/40850581153 at 72a1cea failed: cmux-next checks (god files, concurrency, crash safety, l10n).
Those jobs last passed at ff35fb4. This pull request is one of 3 merged since: #27344, #27290, #27263.
If the failure is in your change, fix forward on feat-cmux-next. Pull requests run only the tiers their paths reach (docs/ci/cmux-next-tiers.md); label a batch PR full-ci to run them all before merging.

This branch was previously deployed

1 inactive deployment
ci-routing-agent — 3ff04772 Deployed Oct 29, 2026 by teamleaderleo via cmux-tui tree preflight #75812
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant