Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: add chat context and commit detection for remote branches#86

Merged
wesbillman merged 2 commits intomainfrom
chat-context-on-remote-branches
Feb 12, 2026
Merged

feat: add chat context and commit detection for remote branches#86
wesbillman merged 2 commits intomainfrom
chat-context-on-remote-branches

Conversation

@wesbillman
Copy link
Collaborator

@wesbillman wesbillman commented Feb 12, 2026

Summary

  • Add blox::ws_exec() helper to run commands inside remote Blox workspaces
  • Build branch history context (commit log + notes) for remote branches via ws_exec git commands, so AI sessions on remote branches get the same rich context as local ones
  • Enable commit detection for remote branches by fetching HEAD via ws_exec before/after sessions
  • Refactor shared context-building logic (context_preamble, append_notes_context) to reduce duplication between local and remote paths

Test plan

  • Start a chat session on a remote branch and verify the AI receives commit history and notes context
  • Start a commit session on a remote branch and verify the new commit SHA is detected post-session
  • Verify local branch sessions continue to work unchanged
  • Verify timeline view shows commits for remote branches

🤖 Generated with Claude Code

wesbillman and others added 2 commits February 12, 2026 13:36
Remote branches were missing both branch context (commit history + notes)
and post-session commit detection because there's no local worktree to run
git against. This adds `blox::ws_exec()` to run commands inside remote
workspaces, enabling:

- Pre-session: fetch commit history via `ws_exec git log` and HEAD SHA
  via `ws_exec git rev-parse HEAD` for commit detection baseline
- Post-session: compare HEAD SHA to detect new commits, same as local
- Branch context: remote branches now get full commit history + notes
  from DB, instead of an empty string

Refactors `build_branch_context` into shared helpers (`context_preamble`,
`append_notes_context`) so both local and remote paths include DB-sourced
notes without duplication.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
The timeline for remote branches never showed completed commits because
get_branch_timeline() only fetched git commits from local worktrees.
Remote branches have no local worktree, so the git commit list was always
empty. Detected commits had their SHA filled in by post-session hooks,
but then fell through both code paths: the local worktree path (skipped)
and the pending-commit path (sha IS NULL filter excluded them).

Now remote branches fetch commits directly via `ws_exec git log` using
the same format string as the local path, so completed commits appear
in branch cards immediately after detection.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@wesbillman wesbillman merged commit c8cbfb5 into main Feb 12, 2026
3 checks passed
@wesbillman wesbillman deleted the chat-context-on-remote-branches branch February 12, 2026 21:49
loganj added a commit that referenced this pull request Feb 26, 2026
## Summary
- Dev mode (`just dev`, `just dev-desktop`) uses ports 8082/8083 instead of 8080/8081
- Installed Penpal.app stays on 8080/8081, so both can run simultaneously
- Tauri sidecar reads `PENPAL_PORT`/`PENPAL_GO_PORT` env vars (defaults to 8080/8081 for production)
- `just dev` now waits for Vite readiness instead of `sleep 2`

## Port map

| Scenario | Go main | Go template | Frontend |
|---|---|---|---|
| `just run` / Installed app | 8080 | 8081 | dist/ or Tauri |
| `just dev` / `dev-desktop` | 8082 | 8083 | Vite :5173 |

## Test plan
- [ ] `just dev` → opens :5173, API calls proxy to :8082
- [ ] `just dev` with installed Penpal.app running → no port conflict
- [ ] `just dev-desktop` → Tauri app connects to :8082
- [ ] Installed app still works on :8080

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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.

2 participants