lorenzo/start kw integration pr 2 - #199
Draft
lorenzoberts wants to merge 7 commits into
Draft
Conversation
lorenzoberts
force-pushed
the
lorenzo/start-kw-integration-pr-2
branch
from
August 20, 2026 21:01
cf4bf1d to
7cab36c
Compare
This commit adds a configuration knob, defaulting to true, so apply can leave HEAD on the new patchset branch. The setting goes through the existing edit-config round-trip, and existing config files pick up the default without a migration. This commit is part of the kw integration's step 2. Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit makes apply honor stay_on_applied_branch. After a successful git am, patch-hub leaves HEAD on the new patchset branch so kw build can run from the applied state without an extra checkout; setting the option to false keeps the previous switch-back. Failed applies still abort and restore the original branch. This commit is part of the kw integration's step 2. Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit introduces the kw module's apply-history store. Each successful git am is recorded as user state — message id, tree, and branch snapshot — in kw_apply_history.json, using the same atomic write pattern as the other JSON repositories. A missing file reads as empty; a corrupt file errors instead of being silently overwritten. This commit is part of the kw integration's step 2. Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit writes an apply record after a successful git am so the applied patchset, tree, and branch are durable across sessions. A history-write failure does not turn a successful apply into a reported failure: the success popup stays and the error is traced. The store is injected as a shared instance through AppServices. This commit is part of the kw integration's step 2. Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit keys apply records by message id and kernel tree so the same patchset applied to several trees keeps one record per tree. Store errors name the history file with an actionable popup, and an unresolvable target tree warns instead of panicking the TUI. This commit is part of the kw integration's step 2. Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit lifts the tmp-then-rename JSON write used by lore, config, and kw history into a shared file-system helper. Serialization is uniformly pretty-printed; serde failures on config save now surface as filesystem errors, and the unused ConfigError::Save variant is removed. This commit completes the kw integration's step 2. Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit drops comments that point at later steps, KwOps, or readiness probes that are not in this change. The dead_code allowance on apply_record stays; the comment around it does not. This commit is part of the kw integration's step 2. Signed-off-by: lorenzoberts <lorenzobs@usp.br> Co-authored-by: Cursor <cursoragent@cursor.com>
lorenzoberts
force-pushed
the
lorenzo/start-kw-integration-pr-2
branch
from
August 24, 2026 17:27
7cab36c to
720501a
Compare
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
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.
Stack created with GitHub Stacks CLI • Give Feedback 💬