CPLAT-10756: show PR/Jira status inline in ccx URL menus#64
Merged
Conversation
JIRA: https://sendbird.atlassian.net/browse/CPLAT-10756 The References preview resolves PR/Jira status (OPEN/MERGED/DRAFT/CLOSED, review decision, checks rollup, Jira status) but the URL menus — both the in-TUI URL modal and the standalone `ccx urls` picker — showed only a bare "PR"/"JIRA" badge and the label. So when jumping between adjacent tmux sessions you couldn't tell at a glance whether a linked PR was still open or already merged without opening it. Make both URL menus status-aware, reusing the same resolve path the References preview uses: - session: export ClassifyURLRef (URL → SessionRef PR/Jira classifier) and add RefStatusText, a plain-text (no-ANSI) status summary usable by both menus and potential --plain output. Both are covered by unit tests. - tui: openURLMenuFromItems now dispatches an async resolve for every PR/Jira row (resolveURLRefsCmd), streaming urlRefStatusMsg back one ref at a time. Rows render the status suffix inline via urlRefStatusText. - cli: the picker's Init() dispatches the same async resolve (resolveRefsCmd), handles pickerRefStatusMsg, and renders the status suffix per row. Both reuse session.ResolveRef, so results are TTL-cached (5 min) and share the existing bounded gh/Jira concurrency — no extra load beyond what the References preview already incurs. File/changes scopes contain no PR/Jira links, so this is a no-op for them.
Kairo-Kim
approved these changes
Jul 9, 2026
mitrilmad
approved these changes
Jul 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JIRA: https://sendbird.atlassian.net/browse/CPLAT-10756
Problem
The References preview resolves PR/Jira status (OPEN/MERGED/DRAFT/CLOSED, review decision, checks rollup, Jira status), but the URL menus — both the in-TUI URL modal and the standalone
ccx urlspicker — showed only a barePR/JIRAbadge and the label.So when jumping between adjacent tmux sessions, you couldn't tell at a glance whether a linked PR was still open or already merged without opening it.
Fix
Make both URL menus status-aware, reusing the same resolve path the References preview uses.
internal/sessionClassifyURLRef(URL →SessionRefPR/Jira classifier), a thin wrapper over the existing internalclassifyRef.RefStatusText— a plain-text (no-ANSI) status summary usable by both menus (e.g.OPEN · approved · checks ✓,MERGED,In Progress).TestClassifyURLRef,TestRefStatusText).internal/tui(URL modal)openURLMenuFromItemsdispatches an async resolve for every PR/Jira row (resolveURLRefsCmd), streamingurlRefStatusMsgback one ref at a time.urlRefStatusText.internal/cli(ccx urlspicker)Init()dispatches the same async resolve (resolveRefsCmd), handlespickerRefStatusMsg, and renders the status suffix per row.Notes
session.ResolveRef, so results are TTL-cached (5 min) and share the existing bounded gh/Jira concurrency — no extra load beyond what the References preview already incurs.--plainoutput is intentionally left untouched (tab-separated, machine-consumed; no synchronous gh/Jira calls injected into a pipe).Testing
go test ./internal/session/ ./internal/tui/ ./internal/cli/ ./internal/extract/all green.go build+ install clean.