Skip to content

Show branch and working-tree changes on a Session Chat pill - #317

Merged
ivanfenenko merged 3 commits into
mainfrom
feature/session-repo-strip
Sep 28, 2026
Merged

ivanfenenko merged 3 commits into
mainfrom
feature/session-repo-strip

Conversation

@ivanfenenko

@ivanfenenko ivanfenenko commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Session Chat shows the current branch and working-tree line counts in one floating pill, on iOS and Android. The header repo strip and the last-turn review pill are gone.

  • Shown whenever the branch is known and the float stack is up, including during a turn. Hidden when there is no git branch, and while the todos sheet is open.
  • Clean tree: branch name only. Dirty tree: branch plus +N and −N when those counts are above zero. No file list on the session.
  • Tap opens Changes on the working tree. Last turn stays a tab on Changes, not a second session pill.
  • Stack order is syncing, then todos, then this pill.

Test plan

  • Android unit tests: SessionBranchPillVisibilityTest, SessionChatRepoStripTest, ReviewChangesPillVisibilityTest
  • iOS tests: SessionChatBranchPillTests, SessionBranchPillLabelTests, SessionChatRepoStripTests
  • Manual check: dirty pill shows branch and counts, clean pill shows branch only, tap opens working-tree Changes, todos sheet hides the pill

ivanfenenko and others added 2 commits September 27, 2026 11:20
Show the current branch and uncommitted working-tree changes under the
Session Chat header on iOS and Android. New sessions start with the file
list expanded when the tree is dirty; active sessions start collapsed.
The strip refetches after each turn and on vcs.branch.updated (v1).

- Add VcsFileStatus domain model and getVcsStatus through V1 (/vcs/status)
  and V2 (/api/vcs/status) remotes behind the session domain adapter.
- Add OpenCodeRepoStrip design-system component with collapsed, expanded
  and clean states, gallery entries and previews.
- Add SessionChatRepoStrip screen-model region and wire it into the
  Session Chat view model and screen on both platforms.
- Cover formatters, region defaults, toggle persistence, turn-completion
  refetch, branch events and 404 fallbacks with unit tests.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@ivanfenenko
ivanfenenko force-pushed the feature/session-repo-strip branch from 4f90cf6 to bfab0d8 Compare September 27, 2026 13:08
@ivanfenenko ivanfenenko changed the title Add repo strip with branch and git status to Session Chat Show branch and working-tree changes on a Session Chat pill Sep 27, 2026
@ivanfenenko
ivanfenenko merged commit 77492df into main Sep 28, 2026
3 checks passed
@ivanfenenko
ivanfenenko deleted the feature/session-repo-strip branch September 28, 2026 19:00
@linear-code

linear-code Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
OPE-192 Live-update the session branch from v1 VCS events

When the git branch changes on a v1 server, Session Chat / Changes should show the new branch without a manual refresh.

TUI v1 patches branch from vcs.branch.updated. Mobile only learns the branch from REST.

Parent

OPE-184 — Show remaining live events in Session Chat

What to build

A live branch change updates the branch chrome the product already shows (Changes / session VCS). Reconnect still reseeds from REST. Both platforms.

Acceptance criteria

  • ☑ vcs.branch.updated updates the visible branch for the open workspace
  • ☑ Reconnect still reseeds from REST
  • ☑ iOS and Android stay in parity

Shipped by the Session Chat repo strip in opencode-mobile/opencode-mobile#317. The strip refreshes on vcs.branch.updated, and the event adapter passes that v1 event type through unchanged.

Blocked by

None — can start immediately.

Review in Linear

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