Change chronology view: a time-ordered bar of agent file changes in the attached view#149
Open
bakedbean wants to merge 53 commits into
Open
Change chronology view: a time-ordered bar of agent file changes in the attached view#149bakedbean wants to merge 53 commits into
bakedbean wants to merge 53 commits into
Conversation
Extract spawn_parts from spawn_resolved's tail so the detach-spawn sequence lives in one place. Route both spawn_resolved and open_in_editor_at through it, eliminating the duplicate implementation introduced in c446025. Add a test proving {file}/{line} substitute when they appear in separate argv tokens.
Add `ChronologyConfig` / `ChronologyOverride` / `WidthSpec` / `Side`
types in `src/config/chronology.rs` with per-field merge, `sanitize()`
clamping, and `resolved_width()`. Wire the `repos.chronology_config`
TEXT column via schema migration v13, a new `set_repo_chronology_config`
setter, and an updated SELECT in `repos()` (indices 0-12). Sweep all
`Repo { .. }` struct literals to add `chronology_config: None`.
…ntry rects per frame
…modal Adds a ChronologyConfig variant to RepoSettingField (after DetailBarConfig) and wires it through every site the detail-bar config uses: the ALL array, label(), the editor-seed getter (reads repo.chronology_config), the modal row list, and apply_repo_setting. The apply arm validates the edited JSON as ChronologyOverride (the partial per-repo override type, mirroring how the detail-bar arm validates DetailBarOverride rather than the full config) and persists via store.set_repo_chronology_config, passing None when empty. Also adds a config test proving the per-repo override flows through resolve() when the global config is unset (side override -> Side::Left, other fields stay at global defaults).
The chronology bar's scroll offset and expanded-entry index persisted across focused-workspace switches, so they could point at an entry belonging to an unrelated workspace. Adds a chronology_last_workspace sentinel to App and a reset_chronology_state_on_workspace_change helper that zeroes the scroll and clears the expanded index when the focused workspace id changes, called in the attached renderer just before those fields are read. Mirrors the existing detail-bar reset_detail_scroll_on_workspace_change pattern.
…impls) - Remove the redundant trailing `return;` at the end of the chronology-click if/else-if chain in app/input.rs: the chain is the last statement in the mouse-down arm, so the early return was a no-op (control flow unchanged). - Replace the manual `impl Default for Side` with `#[derive(Default)]` plus `#[default]` on the Right variant. Side::Right stays the default and the serde `rename_all = "lowercase"` is preserved.
…nt in bar rendering
Replace resolve_editor_at_argv's first-token-only check with a scan of all argv tokens, so window-wrapper configs like `alacritty -e nvim` or `wezterm start -- code` detect the inner editor and retain the line number. Adds GotoStyle enum + known_editor_goto helper; extends known editors to include zed (Goto) and nano (PlusLine). 4 new tests + 6 pre-existing pass.
…orks
Adds a `path` parameter to `resolve_editor_at_argv` and substitutes
`{path}` (the worktree) across all tokens before the `{file}`/`{line}`
logic, so a command like `xdg-terminal-exec --dir={path} nvim` works
for the chronology bar's open-at-line action as well as the dir-open
action. Updates all 12 existing call sites and adds 2 new tests.
README updated to document `{path}` substitution for this action.
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.
Summary
Adds a toggleable vertical Change Chronology bar to wsx's attached view: a newest-first, time-ordered series of the individual file changes the agent made — one entry per edit (not a commit list) — to help you keep your sense of where code lives and why under agentic editing.
(size, mtime).file:line.chronology_configJSON, resolved globally (wsx config set) and per-repo (repo-settings modal), mirroring the existingdetail_bar_configpattern.open_in_editor_atadds{file}/{line}placeholders with goto fallbacks (code --goto file:line,vim/nvim/emacs +line file).Keybindings (attached, under the
Ctrl-xleader)Ctrl-x c— toggle the barCtrl-x C— swap side (left/right)Scope
Implemented end-to-end for Claude sessions. Codex/Pi/Hermes feeds are a deliberate, documented follow-up — see "Phase 8 scope correction" in the plan: none of those parsers currently expose file paths/change text, and Hermes is a SQLite store (not files), so each needs format-specific work against real session samples. Non-Claude agents show an empty bar (em-dash placeholder), never a crash.
Design & plan
docs/superpowers/specs/2026-06-05-change-chronology-view-design.mddocs/superpowers/plans/2026-06-05-change-chronology-view.mdBuilt task-by-task (TDD) with per-task spec + code-quality review and a final whole-feature review.
Test Plan
cargo test --lib— 1098 passing, 0 failingcargo build— zero warningscargo clippy --lib— no warnings in feature filescargo fmt --check— cleanCtrl-x ctoggles;Ctrl-x Cswaps side; wheel scrolls; click expands a diff peek; second click opens the editor at the right linewsx config set chronology_config '{"side":"left","width":{"min_cols":30}}'(global) and a per-repo override via the repo-settings modal both take effect live