Conversation
|
Here's a thought, should we just have 2 buttons.
Then allow the user to specifically set a default in the UI? We want to minimize clicks here. |
I'm not sure I made it clear enough, the the red re-analyze was also meant for when something upstream is pushed to e.g. the PR you are looking at. To continue on this it might be worth thinking about the other potential clicks around the UI. What about analyze flow, though it might be a token-heavy operation, its almost always the feedback I reach for, at least for larger MRs. What are your thought here, do you think there is an elegant way to bind them together? |
|
Having thought about it, my suggestion is as follows:
Then people can opt out of using an LLM pass but it's a single click for users that just want to run the automated review. The other thing to consider here is that we might want to pass the existing groupings to claude if we are doing a reanalysis (changed code upstream). It's worth checking we do this rather than starting from scratch, as we could then just look at new files and merge/change groupings rather than reading the entire context again. |
|
Agreed. Red and a double verify as to not accidentally lose the current state. This will make the width of but button constant without changing wording. Regarding context forwarded I partly agree. The simple approach is purge an re-run. Alternatively we will have to follow the edges to find the affected code by the recent changed, and updated relevant groups based on this. What would be your primary concern on what to optimize here? I am not sure incremental updates like this necessarily saves tokens. |
|
My view point would be on the concern is as the diffsize grows, the search grows. Imagine if 1 file had changed and we throw away at 200 file grouping to start re-grouping. Re-analysis - small edits: We probably want something like if there is less than 10% of new files -> add new files to be classified into the existing groups. |
|
I'll see if a can make the traversal work to ensure we only hit the right stuff, then :D |
|
Cool, just to clarify:
Hope that clarifies that we're trying to save tokens + search time on LLMs, not necessarily graph traversal. |
Top bar: plain Analyze and Refine buttons replace the in-panel refinement banner. Analyze is blue before an analysis exists, red once one is loaded, and asks for a second click before discarding current groups. Refine greys out with a tooltip naming why it is unavailable. Refinement: incremental mode carries the previous refined grouping onto a fresh analysis and asks the LLM only for adjustments; in-flight jobs can be cancelled; a cached refinement is only auto-applied after re-analysis when its head commit and full file set match the fresh diff, otherwise it becomes the baseline for the next update. Review fixes: re-analysis cancels an in-flight refinement and rejects its pending stream so the top bar cannot stick on "Refining"; a job that finishes after a fresh analyze no longer overwrites it; the in-memory refinement baseline is cleared on every analyze so it cannot leak across repos; carried-over groups only keep files the fresh pass still groups; the PR head watcher no longer emits a phantom push when its seed poll failed. Adds a `typecheck:e2e` script so spec files are type-checked without launching a browser.
Applies the review decisions from PR jamesaphoenix#17. Top bar: the standalone Refine button is gone. Analyze is the only button, with a pre-checked "Refine" box beside it, so the common path is one click and opting out of the LLM pass is one more. The box is bound to the persisted refinement_enabled setting, so unchecking it is also how the user changes the default, and it stays in sync with the settings panel. The button holds a fixed width so swapping between Analyze, Reanalyze, Analyzing and Confirm cannot shift the bar under the pointer, and it only turns red for the case that warrants it: new commits upstream. That click re-resolves the PR tip rather than re-analyzing a stale checkout. The second-click confirmation stays. Every explicit analyze — the button, Enter in the repo field, Refresh on the new-commits bar — arms the refine chain from the checkbox, so auto-analysis on load never spends tokens unasked. Refinement: carrying the previous LLM grouping onto a fresh analysis now only pays off while the diff has barely moved, so it is gated on new_file_ratio against INCREMENTAL_MAX_NEW_FILE_RATIO. Past 10% of the files being new since the last refinement, repair costs the model more context than regrouping, and the pass starts from scratch instead. Graph traversal is re-run either way; only the model's grouping work is worth preserving.
Toggling Refine (or Annotations, or the metadata pass) off in the app stuck for as long as no repository was loaded, then silently flipped back on. The app writes only the global config, but a config loaded from a repo directory merged the two enable flags with OR — and those flags are plain bools defaulting to true, so a repo that never mentions refinement contributes true and the global false can never win. Every repo without a .diffcore.toml hit this, which is most of them. Merge with AND instead: these passes cost the user money, so either side may switch one off and neither can force it back on. A repo opting out still wins, which it did before. annotations_enabled was not merged at all, leaving its toggle equally stuck, so it joins the other two.
ae7af55 to
77fe11d
Compare
|
I iimplemented your decisions from above, the preview has been updated to the new layout Top bar
Incremental refinement Carrying the previous LLM grouping onto a fresh analysis is now gated on how far A bug was found Putting the refine flag in the top bar exposed that it didn't stick: toggle it off, Merged with AND instead: these passes cost money, so either side may switch one off One open question There's no longer a way to refine without re-analyzing. That falls out of the |
Applies the review decisions from PR jamesaphoenix#17. Top bar: the standalone Refine button is gone. Analyze is the only button, with a pre-checked "Refine" box beside it, so the common path is one click and opting out of the LLM pass is one more. The box is bound to the persisted refinement_enabled setting, so unchecking it is also how the user changes the default, and it stays in sync with the settings panel. The button holds a fixed width so swapping between Analyze, Reanalyze, Analyzing and Confirm cannot shift the bar under the pointer, and it only turns red for the case that warrants it: new commits upstream. That click re-resolves the PR tip rather than re-analyzing a stale checkout. The second-click confirmation stays. Every explicit analyze — the button, Enter in the repo field, Refresh on the new-commits bar — arms the refine chain from the checkbox, so auto-analysis on load never spends tokens unasked. Refinement: carrying the previous LLM grouping onto a fresh analysis now only pays off while the diff has barely moved, so it is gated on new_file_ratio against INCREMENTAL_MAX_NEW_FILE_RATIO. Past 10% of the files being new since the last refinement, repair costs the model more context than regrouping, and the pass starts from scratch instead. Graph traversal is re-run either way; only the model's grouping work is worth preserving.
Summary
Top bar. Two plain buttons replace the in-panel refinement banner.
Refinement backend.
carry_over_grouping).RefinementResultrecordshead_shaand the coveredfiles; older cached JSON still deserializes (tested).File 'src/sepseeq/cli.py' not found in diffafter re-analyzing with a stale cached refinement.Also: PR/MR head polling with a "New commits" bar, and a
typecheck:e2enpm script so Playwright spec files are type-checked without a browser.Preview
out.mp4
Tests
cargo test -p diffcore-core -p diffcore-tauri: 2229 passed, 0 failed.npx tsc --noEmitandnpm run typecheck:e2e: clean.npm run build: OK.