Skip to content

fix: hide share button entirely in git mode#294

Merged
tomasz-tomczyk merged 1 commit intomainfrom
fix/share-button-hidden-in-git-mode
Apr 17, 2026
Merged

fix: hide share button entirely in git mode#294
tomasz-tomczyk merged 1 commit intomainfrom
fix/share-button-hidden-in-git-mode

Conversation

@tomasz-tomczyk
Copy link
Copy Markdown
Owner

Summary

Test plan

  • Updated `e2e/tests/share.spec.ts` to assert the button is hidden in git mode
  • Full Playwright suite passes in CI

🤖 Generated with Claude Code

Previously the button rendered visible-but-disabled with a tooltip. Users
shouldn't see a dead affordance for an unsupported mode — hide it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@tomasz-tomczyk tomasz-tomczyk merged commit 7619b09 into main Apr 17, 2026
4 checks passed
@tomasz-tomczyk tomasz-tomczyk deleted the fix/share-button-hidden-in-git-mode branch April 17, 2026 09:29
tomasz-tomczyk pushed a commit that referenced this pull request Apr 29, 2026
Drop the old focus-picker popover (Working tree / Your stack / Other PRs /
Branches) in favour of a narrower, more focused UI inspired by stacked-PR
review tools that only handle in-stack navigation.

Frontend
- New stack breadcrumb in the header: main > #294 > #295 (reviewing) >
  #296, rendered inline (not a popover). Default-branch click flips
  diff_scope to full_stack on the current focus; other entries swap focus
  via /api/focus. Visibility uses stack.length > 1 (not is_stacked) so
  local-only stacks and Sapling-style commit chains also get the
  breadcrumb. Long stacks collapse the middle into an ellipsis.
- New Working tree pill, visible whenever focus is range in git mode.
- Layer/full-stack toggle now appears whenever default_sha is resolved,
  not only for is_stacked focus.
- Other PRs / Remote branches sections deleted from the frontend; backend
  /api/picker still returns them but the frontend stops consuming them.
- focus-changed SSE handler fixed to parse the wrapper.content payload
  correctly (the old handler relied on page reloads in tests to mask this).

Backend (picker.go)
- detectStack adds tier-3 fallback for naked-commit ancestors on the topic
  chain (commits reachable from HEAD but not the default branch). Uses
  first-line commit subject as the label so Sapling-style git stacks of
  unbranched commits surface in the picker.
- Topic-chain filter prevents long-lived feature branches from drowning
  the breadcrumb in default-branch ancestors.

CLI
- Help text now lists --pr <num|url> and --range <baseSHA>..<headSHA> as
  the entry points into range mode.

Tests
- Rewrote focus-picker.rangemode.spec.ts and focus-picker-wt-entry for
  the breadcrumb. Added breadcrumb-current-marker,
  breadcrumb-default-branch, breadcrumb-ellipsis, breadcrumb-local-stack,
  breadcrumb-no-pr specs.
- Updated focus-switch.rangemode for the working-tree pill.
- loading.filemode + nogit.nogit assert the breadcrumb and pill stay
  hidden in non-VCS modes.
- range-loading header-label test now checks the breadcrumb reviewing
  marker instead of the removed #focusPickerLabel.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant