Make the Capture and Send buttons toggles so a capture or send can be stopped #15
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 371 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.354
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #15"
general
weight: 0.35
jcsteh
Rebased onto current master and rewritten from scratch. The previous mess was my fork being 28 commits behind without me realising. Sorry for the wasted time; this should be a much easier read.
Answering your three points:
1. What problem is this solving?
Three concrete things, all of which I've hit in real use:
So: the buttons become toggles (
BS_AUTOCHECKBOX | BS_PUSHLIKE), pressing again stops the capture or send, and the settings that can't take effect mid-run are disabled.2. In2Clap
Included this time. All three plug-ins get the same treatment.
3. Refactoring vs functional change
Split into separate commits:
1.
dev: Move the code which starts a capture or send out of activate() and into a separate function so that the caller can handle failure.— pure refactor, no functional change. The moved bodies are character-identical to the originals;git show --color-moved=zebraon that commit shows this clearly. The reason it's needed:activate()now has to not fail when the user simply hasn't pressed the button, and has to un-press the button if starting fails. Since the setup code has a dozen earlyreturn falsepaths, the caller needs to be able to see that failure and act on it, which means it can't beactivate()itself.2. The toggles.
3. Disabling the settings which can't change while running.
Note on state
Nothing is added to the saved state, so
STATE_VERSIONis unchanged in all three plug-ins andstateSaveisn't touched. As you suggested,_capturing/_sendingdefaults to false andstateLoadderives it from what's already saved, which is exact rather than a guess: we only ever save a target once the user has pressed the button. In App2Clap that means "capture everything" or "capture first matching process when reloaded"; in Clap2App and In2Clap it means a saved device. Everything else (a specific process id) was never resumable anyway, since we don't save the pid.Tested in REAPER: App2Clap and In2Clap, including stopping and restarting a capture, changing process mid-session, and resuming a saved capture from a project template.