Repository navigation
fix(agent): keep working copy on agent view at session end - #148
Merged
Merged
Conversation
Session-end used to switch the working copy back to the session's parent view. That made the review flow clunky: exit the harness and you land back on dev, forced to hunt 'atomic view list' for the draft view holding the agent's single change before you can insert it. Leave the working copy on the session's agent view instead so the user lands where the work happened and can review (log/diff) and insert from there. parent_view is still recorded — it remains the fork baseline and the 'attest --pending' delta reference.
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.
Problem
On
SessionEnd, the turn orchestrator switched the working copy back to the session's parent view (session_end.rscalledrepo.switch_view(parent)). That makes the review flow clunky:atomic view listatomic insert from-view <the view you hope holds the work>Landing back on
devhides the work that was just done. Users who close their session (rather than keeping it open in another tab) have no idea which draft view holds their agent's changes.Fix
Remove the switch-back. The working copy stays on the session's agent view when the session ends, so the user lands exactly where the work happened and can review (
atomic log/atomic diff) andatomic insertfrom there.parent_viewis still captured at session start — it remains the fork baseline for the just-in-time self-heal inrecord_turnand the delta reference foratomic agent attest --pending.Changes
atomic-agent/src/turn/orchestrator/session_end.rs— drop theswitch_view(parent)block; document that staying on the agent view is deliberateatomic-agent/src/turn/orchestrator/session_start.rs— update stale comment claiming session-end switches backatomic-agent/src/turn/orchestrator/tests.rs— assert the new behavior:current_view()remains the agent view after session enddocs/adding-agents.md,atomic-repository/vault/skills/atomic-vault.md— docs updated to matchTesting
cargo test -p atomic-agent— 1313 passed, 0 failedcargo clippy -p atomic-agent— clean