Repository navigation
fix(bitbucket): show mention names without changing editable source - #21648
juliusmarminge wants to merge 3582 commits into
Conversation
ApprovabilityVerdict: Needs Human Approval Macroscope's review found this PR requires human approval — The changes add a lint suppression in .pnpmfile.cjs:31 that requires human review. The visible scope also includes release and infrastructure workflows with unresolved token-exposure and relay-lifecycle findings; the incomplete remainder has not been certified. Needs human approval because:
No code changes detected at Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: unavailable · PR result: Scenario and decoded snapshot size10 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.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
|
Important Review skippedWe couldn't safely recover the incremental review. No full review was started, and the last reviewed checkpoint was preserved. Retry later, or explicitly request a full review by commenting You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: maria-rcks <[email protected]> Co-authored-by: Julius Marminge <[email protected]>
) Co-authored-by: maria-rcks <[email protected]> Co-authored-by: Julius Marminge <[email protected]>
Co-authored-by: maria-rcks <[email protected]> Co-authored-by: Julius Marminge <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: maria-rcks <[email protected]>
…#31998) Co-authored-by: Julius Marminge <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: danddanddand <[email protected]> Co-authored-by: whoisaldo <[email protected]> Co-authored-by: maria-rcks <[email protected]> Co-authored-by: juliusmarminge <[email protected]> Co-authored-by: Claudesaul <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: maria-rcks <[email protected]>
Co-authored-by: PR Batch Tester <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: maria-rcks <[email protected]>
… Android (#28524) Co-authored-by: Claude Opus 5.5 <[email protected]>
…28125) Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Julius Marminge <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
… on iPhone Duo (#33213) Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: PR Batch Tester <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: GPT-6.1 Sol <[email protected]> Co-authored-by: maria-rcks <[email protected]>
Co-authored-by: maria-rcks <[email protected]> Co-authored-by: Julius Marminge <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Toggle and copy icons swap instantly through lucide-react again. Drops the MorphIcon wrapper plus the morphicons and vanilla lucide dependencies that only it used.
## Problem OpenCode shell tools can return when a background command launches. T3 now keeps that command in its existing background activity UI until it exits or is stopped, retains captured output, and preserves native completion notifications and continuation turns. ## Change The adapter scopes tracking and Stop to the owning session and its descendants. Recovery uses the experimental shell-job inventory on OpenCode 2.2.6+, with shell-list fallback on supported older servers. After a cold resume, recovered output, terminal state, and idle roster snapshots persist through the existing session event pump before another turn starts. New session-scoped activity is restricted to attached threads and uses the persisted run identity when available so it stays in the current timeline. Polling reads run outside the adapter lock, with stale results discarded after Stop, exit, or another read. Recovery and Stop retain bounded I/O. Final reads retain the output tail, including diagnostics beyond the first four pages. The SDK remains pinned to 2.0.28, and main's native goals, todo checklists, and image jobs are preserved. ## Scope and approval Maintainer-directed implementation of native OpenCode background shell tracking from the T3 Code handoff. Scope covers shell lifecycle, output retention, recovery, ownership, and Stop using existing background activity services and rendering. The session event pump extension is needed to persist recovered activity while no turn is active. No SDK upgrade, new UI, or provider-wide infrastructure is included. The author, Yash-Singh1, is explicitly listed in the repository's [contribution-triage exemptions](https://github.com/pingdotgg/t3code/blob/main/.github/TRIAGE_EXEMPTIONS.td), verified against upstream main. ## Verification Validation: `vp run check:changed` passes. Focused regressions cover output paging, exit codes, idle recovery, persisted run anchors, ownership, cancellation failures, and a stalled poll that must not block turn completion or Stop. Real OpenCode UI turns used MiniMax M3.1 Flash Free against isolated development state and covered launch, Details and retained output, natural completion, continuation, and explicit Stop. Cold-idle persistence and remote-server paths use protocol fixtures; native mobile was not exercised. GPT 6.1 Sol through the Codex harness.
…xt (#32902) Co-authored-by: Claude Opus 5.5 <[email protected]>
…32646) Co-authored-by: Claude Opus 5.5 <[email protected]>
…Linux desktop (#32963) Co-authored-by: Claude Opus 5.5 <[email protected]>
…ound (#32151) Co-authored-by: Julius Marminge <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Julius Marminge <[email protected]>
Co-authored-by: maria-rcks <[email protected]> Co-authored-by: Julius Marminge <[email protected]>
… into its own folder (#32681) Co-authored-by: Claude Opus 5.5 <[email protected]>
…e back (#33396) Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: maria-rcks <[email protected]> Co-authored-by: Julius Marminge <[email protected]>
…cket-mention-display # Conflicts: # apps/mobile/src/features/pull-requests/PullRequestDiscussionScreen.tsx # apps/mobile/src/features/pull-requests/PullRequestRouteScreen.tsx # apps/mobile/src/features/pull-requests/pullRequestDiffComments.test.ts # apps/mobile/src/features/pull-requests/pullRequestDiffComments.ts # apps/web/package.json # apps/web/src/components/pullRequest/PullRequestSummaryTab.tsx # apps/web/src/components/pullRequest/pullRequestDetail.logic.test.ts # apps/web/src/components/pullRequest/pullRequestDetail.logic.ts # packages/source-control-bitbucket/src/server/bitbucketPullRequestJson.ts # pnpm-lock.yaml
…mes are shown Map a checkbox in the displayed description back to the same task in the raw source, and show display text only while no local draft is in force. AI-assisted; verified with the tests and tools listed above.
…34191) Co-authored-by: Claude Opus 5.5 <[email protected]>
…8084) Co-authored-by: Claude Opus 5.5 <[email protected]>
…en it cannot be cloned (#33058) Co-authored-by: Ajraba04 <[email protected]> Co-authored-by: Julius Marminge <[email protected]>
| FINGERPRINT: ${{ steps.client.outputs.fingerprint }} | ||
| CLIENT: ${{ steps.client.outputs.link }} | ||
| GROUP: ${{ steps.update.outputs.group }} | ||
| run: node .trusted/.github/scripts/mobile-preview-comment.cjs |
There was a problem hiding this comment.
🟠 High workflows/mobile-eas-preview-fork.yml:229
Fork-controlled scripts can replace .trusted/.github/scripts/mobile-preview-comment.cjs before this step executes it, so the replacement runs with GH_TOKEN and the job’s pull-requests: write permission. This lets the fork modify other PRs’ comments or labels; the Android build job repeats the same trust-boundary problem. Run commenting in a separate trusted job that never executes fork code.
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @.github/workflows/mobile-eas-preview-fork.yml around line 229:
Fork-controlled scripts can replace `.trusted/.github/scripts/mobile-preview-comment.cjs` before this step executes it, so the replacement runs with `GH_TOKEN` and the job’s `pull-requests: write` permission. This lets the fork modify other PRs’ comments or labels; the Android build job repeats the same trust-boundary problem. Run commenting in a separate trusted job that never executes fork code.
| # Destroy also runs the preview tunnel sweep, which is part of the stack. | ||
| - name: Destroy preview stage | ||
| run: vp run --filter t3code-relay destroy --stage "$STAGE" --yes --no-input |
There was a problem hiding this comment.
🟡 Medium workflows/relay-preview-cleanup.yml:80
A delayed closed or unlabeled run can destroy the active pr-<n> stage after the PR has been reopened and redeployed, and a stale closed run can also remove its deployment label. The concurrency group prevents overlap but does not guarantee event ordering, and cleanup_pr never checks the PR’s current state or labels before destroying the stage; recheck eligibility after acquiring the lock and skip stale runs.
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @.github/workflows/relay-preview-cleanup.yml around line 80:
A delayed `closed` or `unlabeled` run can destroy the active `pr-<n>` stage after the PR has been reopened and redeployed, and a stale `closed` run can also remove its deployment label. The concurrency group prevents overlap but does not guarantee event ordering, and `cleanup_pr` never checks the PR’s current state or labels before destroying the stage; recheck eligibility after acquiring the lock and skip stale runs.
| # GITHUB_TOKEN do not start new runs, so this does not redeploy. | ||
| - name: Restore the teardown marker after a failed destroy | ||
| if: failure() && github.event.action == 'unlabeled' | ||
| run: gh pr edit "${{ github.event.pull_request.number }}" --repo "$GITHUB_REPOSITORY" --add-label relay:preview |
There was a problem hiding this comment.
🟡 Medium workflows/relay-preview-cleanup.yml:99
When teardown fails after relay:preview is removed from an open PR, this step restores the deployment opt-in, so a later synchronize can redeploy the preview; the retry sweep then ignores that PR because it lists only closed PRs and skips open ones. Use a separate teardown marker and retry disabled previews without restoring relay:preview.
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @.github/workflows/relay-preview-cleanup.yml around line 99:
When teardown fails after `relay:preview` is removed from an open PR, this step restores the deployment opt-in, so a later `synchronize` can redeploy the preview; the retry sweep then ignores that PR because it lists only closed PRs and skips open ones. Use a separate teardown marker and retry disabled previews without restoring `relay:preview`.
| }); | ||
| const body = JSON.stringify({ body: render(state, runUrl) }); | ||
| if (existing) { | ||
| await github(`/repos/${repository}/issues/comments/${existing.id}`, { method: "PATCH", body }); |
There was a problem hiding this comment.
🟡 Medium scripts/mobile-preview-comment.cjs:113
Concurrent android-build and android jobs can overwrite each other's comment state: the older build can restore a stale fingerprint/group, or the update can erase the newly added install link. Each PATCH replaces the complete body using a state read before either write, so mergeState's fingerprint guard checks a stale snapshot; serialize both writers per PR across the read/merge/write transaction.
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @.github/scripts/mobile-preview-comment.cjs around line 113:
Concurrent `android-build` and `android` jobs can overwrite each other's comment state: the older build can restore a stale fingerprint/group, or the update can erase the newly added install link. Each PATCH replaces the complete body using a state read before either write, so `mergeState`'s fingerprint guard checks a stale snapshot; serialize both writers per PR across the read/merge/write transaction.
| concurrency: | ||
| group: relay-preview-${{ github.event.pull_request.number }} | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| deploy_preview: | ||
| name: Deploy relay preview | ||
| if: >- | ||
| github.event.pull_request.head.repo.full_name == github.repository && | ||
| contains(github.event.pull_request.labels.*.name, 'relay:preview') |
There was a problem hiding this comment.
🟡 Medium workflows/relay-preview.yml:15
A labeled run after relay:preview is removed replaces the queued cleanup run for the same PR, leaving the preview resources running even though deploy_preview is skipped. Workflow-level concurrency applies before the job’s eligibility check; move the concurrency block onto deploy_preview after its if condition so skipped runs cannot replace cleanup.
- concurrency:
- group: relay-preview-${{ github.event.pull_request.number }}
- cancel-in-progress: false
-
jobs:
deploy_preview:
name: Deploy relay preview
if: >-
github.event.pull_request.head.repo.full_name == github.repository &&
contains(github.event.pull_request.labels.*.name, 'relay:preview')
+ concurrency:
+ group: relay-preview-${{ github.event.pull_request.number }}
+ cancel-in-progress: false
runs-on: blacksmith-8vcpu-ubuntu-2404🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @.github/workflows/relay-preview.yml around lines 15-24:
A `labeled` run after `relay:preview` is removed replaces the queued cleanup run for the same PR, leaving the preview resources running even though `deploy_preview` is skipped. Workflow-level concurrency applies before the job’s eligibility check; move the concurrency block onto `deploy_preview` after its `if` condition so skipped runs cannot replace cleanup.
Co-authored-by: Claude Opus 5.5 <[email protected]>
…ses that project (#33439)
…#32832) Co-authored-by: Claude Opus 5.5 <[email protected]>
…uages again (#33680) Co-authored-by: Claude Opus 5.5 <[email protected]>
…cket-mention-display
commented
Nov 11, 2026
|
The automated pipeline stopped on this pull request and will not merge it: the proof has no capture anyone can open:
It stays open for a person to finish or close. |
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:
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.
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