-
Notifications
You must be signed in to change notification settings - Fork 721
Update the stack details on head SHA change #11159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
estib-vega
wants to merge
2
commits into
de-butactionify
Choose a base branch
from
update-stacks-on-head-change
base: de-butactionify
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+137
−18
Conversation
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
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
estib-vega
commented
Nov 11, 2025
Comment on lines
+217
to
+226
| const headResponse = $derived(modeService.head(projectId)); | ||
| const head = $derived(headResponse.response); | ||
| // If the head changes, invalidate stacks and details | ||
| $effect(() => { | ||
| if (head) { | ||
| stackService.invalidateStacksAndDetails(); | ||
| } | ||
| }); | ||
Contributor
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mtsgrd Let's maybe talk about this?
This is the approach to updating the frontend based on the workspace SHA and not the DB updates
Include the current HEAD commit SHA with GitActivity events emitted by the watcher and propagate it through the API and frontend plumbing. - Change GitActivity from a single ProjectId variant to a struct with project_id and head_sha so consumers can know the exact HEAD commit. - When logs/HEAD changes, read the repository HEAD and peel to the commit to obtain the SHA, then emit GitActivity with head_sha. - Surface head SHA to the frontend: include headSha in the ChangeForFrontend payload for git activity. - Add gix and gitbutler-oxidize workspace deps used to access repository information. - Expose head_sha API command and related response types; extend the existing operating_mode command to return head (shorthand) along with operating mode. - Wire the new head_sha command into the server RPC dispatch and tauri command list. This allows the UI and other consumers to reliably identify the current commit when git activity updates occur.
Update the way that the FE listens for the head and mode updates. Additionally, listen for changes in the git SHA that the head points to, updating the stacks and stack details alongside
c14ae0e to
a15aa66
Compare
34e51e0 to
0fe5e21
Compare
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.
This is part 2 of 2 in a stack made with GitButler: