Skip to content

Link to stack pages in output & TUIs - #584

Open
skarim wants to merge 11 commits into
mainfrom
skarim/stack-links
Open

skarim wants to merge 11 commits into
mainfrom
skarim/stack-links

Conversation

@skarim

@skarim skarim commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Adds links from existing stack numbers in command output and TUIs to their GitHub stack pages, preserving compact labels and the existing PR-link fallback behavior.

Functionality and impact

  • Links only the identifier (#N, or the existing numeric picker cell), not surrounding words or spaces.
  • Preserves colored-terminal rendering and narrow layouts. Checkout discovery messages can contain links; confirmation questions remain plain text.
  • Leaves confirmed missing or dissolved stacks unlinked, including stale local picker entries and stacks deleted during lookup.
  • Adds no network requests or persisted URL fields. Existing navigation, JSON output, and path-only output are unchanged.
image image image image image

Key areas to review

Testing

Build, go vet ./..., and the full race-enabled suite (go run ./scripts/test -workers 4) pass. Focused regressions cover ANSI256 rendering, plain confirmation text, missing-stack races, and scroll/resize click targets. Existing command tests carry the lifecycle-output assertions rather than duplicating their workflow fixtures.

Copilot AI max review requested due to automatic review settings October 22, 2026 17:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Terminal hyperlink corruption and incorrect prompt redraw accounting remain unresolved.

7 open issues
What changed in this PR

Adds links from stack-number references to their canonical GitHub pages, extending the CLI’s existing PR-link conventions across command output and terminal interfaces.

Changes:

  • Add host-aware stack URLs, terminal hyperlinks, and copyable text fallbacks.
  • Add clickable stack labels to view/submit and compact links to checkout/merge.
  • Expand regression coverage and document link behavior and environment controls.
File Description
README.md Document stack links and terminal behavior.
internal/​tui/​submitview/​screen.go Style the sidebar stack link and share browser opening.
internal/​tui/​submitview/​render.go Separate the linked header label from repository text.
internal/​tui/​submitview/​mouse.go Handle header and sidebar stack clicks.
internal/​tui/​submitview/​model.go Carry the stack URL into the model.
internal/​tui/​submitview/​model_test.go Test link targets, clipping, scrolling, and editor state.
internal/​tui/​stackview/​model.go Add a clickable stack header.
internal/​tui/​stackview/​model_test.go Test header clicks and existing PR navigation.
internal/​tui/​shared/​header.go Add linked labels and shared hit testing.
internal/​tui/​shared/​header_test.go Test link bounds, visibility, and layout.
internal/​tui/​mergeview/​view.go Link the banner number and use ANSI-aware clipping.
internal/​tui/​mergeview/​types.go Add a compact stack-link option.
internal/​tui/​mergeview/​model_test.go Test banner links and narrow-width rendering.
internal/​tui/​checkoutview/​styles.go Use ANSI-aware truncation.
internal/​tui/​checkoutview/​model.go Render presentation-only links for stack numbers.
internal/​tui/​checkoutview/​model_test.go Test linked rows, search, selection, and clipping.
internal/​github/​github.go Construct canonical stack-page URLs.
internal/​github/​github_test.go Test default and custom-host URLs.
internal/​config/​hyperlink_test.go Test stack-link formatting and compact fallbacks.
internal/​config/​config.go Add shared link and stack-URL helpers.
go.mod Promote the ANSI package to a direct dependency.
docs/​src/​content/​docs/​reference/​cli.md Document stack links and hyperlink controls.
cmd/​view.go Link stack references in text and TUI output.
cmd/​view_test.go Test text links and unchanged JSON output.
cmd/​utils.go Link shared reconciliation messages for surviving stacks.
cmd/​utils_test.go Test reconciliation links and removal exceptions.
cmd/​unstack.go Link eligible references in unstack output.
cmd/​unstack_test.go Test links, removal exceptions, and local-only behavior.
cmd/​sync_test.go Check links in sync reconciliation output.
cmd/​submit.go Supply TUI URLs and link stack lifecycle messages.
cmd/​submit_test.go Test links across stack lifecycle outcomes.
cmd/​merge.go Link fetch diagnostics and supply the wizard link.
cmd/​merge_test.go Test linked fetch-failure diagnostics.
cmd/​link.go Link stack messages and separate diagnostic error kinds.
cmd/​link_test.go Test linked lifecycle messages and missing-stack exceptions.
cmd/​checkout.go Add links to checkout output, prompts, and picker numbers.
cmd/​checkout_test.go Test picker links, prompts, and import output.
cmd/​checkout_picker_test.go Update prompt and load-failure assertions.

Review effort: Max

Comment thread internal/tui/checkoutview/model.go Outdated
Comment thread internal/tui/mergeview/view.go Outdated
Comment thread cmd/checkout.go Outdated
Comment thread cmd/checkout.go Outdated
Comment thread cmd/checkout.go Outdated
Comment thread cmd/link.go
Comment thread internal/tui/submitview/mouse.go
@skarim
skarim force-pushed the skarim/stack-links branch from 17c0ab9 to 57ba15b Compare October 22, 2026 20:48
@skarim skarim changed the title Link stack references to their GitHub pages Link to stack pages in output & TUIs Oct 23, 2026

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants