Skip to content

fix(bitbucket): show mention names without changing editable source - #21648

Open
juliusmarminge wants to merge 3582 commits into
pull-request-12/mention-display-contractfrom
pull-request-12/bitbucket-mention-display
Open

juliusmarminge wants to merge 3582 commits into
pull-request-12/mention-display-contractfrom
pull-request-12/bitbucket-mention-display

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Rebuilt from @0pilatos0’s #14787, which identified the same-object Bitbucket mention metadata and the need to keep editable Markdown intact.

Bitbucket descriptions and comments show account IDs instead of names. Read labels only from the same response object's rendered mention metadata, and substitute prose tokens in optional display fields. Preserve exact authored text outside those ranges, including code, links, escapes, and HTML. Missing or conflicting metadata falls back to raw text; no account lookup or setting is added.

Web/desktop Summary, Timeline and Code readers and the corresponding mobile readers consume display fields. Editors, outgoing writes, drafts and agent context retain raw source. Native diff rows use a paired plain display string, avoiding Markdown conversion that lost authored source. Depends on #21647.

Verification:

  • PR-specific tests reduced from 38 to four cases in existing suites; removed two one-off test files. The original test-bearing selection went from 209 tests in four files to 180 in three, retaining pre-existing coverage. Regression assertions fail on the old behavior. Final affected selection: 190/190 in six files.
  • Scoped typechecks for contracts, source-control-core, Bitbucket, server, web and mobile; changed-file lint, formatting and diff checks pass.
  • Two fresh full-diff rounds by independent Opus and Sol reviewers. Fixed unclosed inline tags masking later mentions and native display stripping unrelated source. Round two found no code blockers.
  • Linux browser against an isolated local Bitbucket API fixture through the real HTTP adapter, decoder, RPC and client: Summary description, ordinary and inline comments, replies, unresolved/resolved Timeline entries, missing-metadata fallback, Code annotation display. Description, normal-comment and inline-comment editors opened raw tokens; cancel restored display; captured PUT requests retained raw account tokens. The normal comment was also saved through Timeline. Agent context was traced and unit-tested, without starting an agent.
  • Current-head build/typecheck, lint, package tests, Rust, release smoke and all eight server shards passed. Test Web and the aggregate Check passed on the single rerun; the initial unrelated WorkflowOpeningBlock highlighting and AttachmentFilePreview URL-recovery failures cleared. The same two browser suites passed locally (6/6). The duplicate native fingerprint runs were cancelled; the replacement run passed. Macroscope requires human approval of this parser/contract change. Human approval and the bottom layer’s remaining web CI failure block stack merge readiness.

Before (actual pinned main) and after (current stack head), same fixture, 1280×800, same viewport and scroll. Both captures use a page-only font substitution because this browser has no fallback fonts; no font/product changes are in the diff.

Before: raw Bitbucket account IDs

After: names with literal code and unknown-ID fallback preserved

Timeline: readable ordinary, inline, reply and resolved comments

Code: readable inline annotation and reply

Edit/cancel/save recording · Captured raw save payloads

The API fixture is synthetic: live Bitbucket Cloud metadata, including rendered description fields and ap-mention attributes, still needs verification with a real account. No runtime verification on macOS, Windows, iOS, Android, Electron desktop, or real remote/relay/tunnel connections. Mobile has type and focused logic coverage only. Human approval of the cross-layer parser/contract change remains required. Unmerged.

Implemented in T3 Code with Codex gpt-6-astra (tests), gpt-6.1-sol (implementation), and Claude claude-opus-5-5 / Codex gpt-6-sol (review).

Fixes #14771

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

Labels

macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews size:L 100-499 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.

[Bug]: Bitbucket PR comments show raw account IDs instead of mention names