Conversation
Clearing the Setup tab meant resetting Calibration, Demosaic, Normalization and Roll Analysis from four separate panel headers, and walking that back cost four presses of Ctrl+Z. Right-click a tab icon now offers "Reset Setup to Defaults", which defaults every panel on the tab in one commit and one undo step. The five workflow tabs offer it. Favorites and History hold no settings. Export is mirrored into sticky settings that reach other frames, Metadata is archival content rather than settings, and Scan drives the scanner and camera through global device settings, so none of the three is part of the frame's edit and none gets a menu. The item greys when the tab is already at its defaults, read from the same fold the reset commits rather than from the modified counts, which trail a debounce. What a panel owns now lives in one table that both the header reset and the tab reset fold, so the two cannot disagree. That collapses SessionManager.reset_section, AppController.clear_roll_baseline and four ControlsPanel helpers into it. Every panel reset consequently commits through apply_config, so one that moves linear_raw or demosaic_preview re-decodes instead of rendering the stale buffer; previously only the two source-baking helpers did that. reset_tab is registered unbound: every Ctrl+digit is a tab already. Bound by hand it takes the tab on screen, where the menu takes the one under the pointer. A tab spilled into the overflow menu cannot be right-clicked; the bar pins the active tab, so selecting it first brings its button back. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
s6stkurz
force-pushed
the
feat/reset-tab-context-menu
branch
from
September 19, 2026 18:35
d628786 to
08bb94b
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.
What this does
Right-click a tab icon in the right panel for Reset Setup to Defaults — every panel on that
tab returns to its defaults in one commit, and one Ctrl+Z walks the whole thing back.
Clearing Setup today means resetting Calibration, Demosaic, Normalization and Roll Analysis from
four separate panel headers, and undoing that costs four presses. The per-panel header resets are
unchanged; this is a second way in, for when the whole tab is what you want gone.
The five workflow tabs offer it: Setup, Geometry, Exposure, Lab & Toning, Finish.
you, and
ExportConfigcarries machine paths — a reset would re-point the destination for thesession.
MetadataConfig()wholesale would be a deletion wearing a reset's label, and the panel alreadyhas per-group clears with the right verb.
not be part of the frame's edit and would not be undoable.
None of those five gets a menu at all, rather than a menu with a dead row.
The item is shown and greyed when the tab is already at its defaults, matching the canvas
right-click menu. Whether it is enabled is read from the same fold the reset commits, not from
the modified counts, which trail a 150 ms debounce.
The part that needs your agreement
An aggregate reset has to produce one
WorkspaceConfigand oneupdate_configcall, or the tabcosts N undo steps. The 14 per-panel resets existed only as lambdas in
_connect_signalswiththree different commit routes, so there was nothing to compose.
So what each panel owns now lives in one table,
_SECTION_RESETS, that both the header reset andthe tab reset fold. That collapses
SessionManager.reset_section,AppController.clear_roll_baselineand fourControlsPanelhelpers into it — a net deletion, butit does touch working code. Two consequences worth your eyes:
apply_config. It comparessource_tokenandre-decodes when a reset moves a source input. Previously only the two source-baking helpers
did this, so a Normalization reset that cleared
linear_rawrendered the stale decode. That isfixed as a side effect rather than on purpose; say the word if you would rather see it on its
own.
Normalizationstill resets the wholeProcessConfig, as it does today, which alsodefaults the Calibration, Demosaic and Roll Analysis fields that live on it. I kept the
existing behaviour rather than scoping it, because scoping is a visible change to a control
that is not what this PR is about. It costs nothing here: a whole-config reset subsumes the
three scoped siblings, so the Setup fold is order-independent either way.
If you would rather not take the refactor, I can rework this as additive code that leaves the 14
wirings alone — it duplicates the "what does Calibration own" knowledge, which is why I did not
lead with it.
Testing
tests/test_tab_reset.py, 16 tests over three layers:its own panel, the fold is identity on a clean tab, a roll reset drops the cached per-frame
bounds and a
lock_boundsframe keeps themapply_configfor a whole tab, none for a clean one, and Dodge & Burn dropsits mask selection
other five produce no menu; plus the greying, the trigger, and the keyboard route
test_clear_roll_baseline_resets_axesmoved out oftests/test_controller.pywith its subject.make format,make lint,make typeclean; full suite passes. One unrelated failure on mymachine,
test_metadata_presets.py::test_load_tooltip_follows_a_rebinding, expectsCtrl+Shift+Lwhere macOS renders
⇧⌘L— it fails the same way onmainwith this branch stashed, and CI runsUbuntu.
Notes
reset_tabis registered with no default key: everyCtrl+<digit>is a tab already. One entryrather than five, since five unbound rows in the
?overlay for one concept reads badly. Boundby hand it takes the tab on screen, where the menu takes the tab under the pointer.
»overflow menu cannot be right-clicked — the spilled items areQActions. The bar pins the active tab, so selecting a tab first always brings its button back.I left
build_overflow_menualone rather than grow it a submenu here.part of the edit and inert in that mode.
docs/USER_GUIDE.mdgains two sentences on the existing panel-header line. No new<!-- panel: -->marker, anddocs/CHANGELOG.mdis untouched.There is no open issue for this one, so it arrives unsolicited. Happy to close it, split it, or
rework it if this is not a direction you want.
🤖 Generated with Claude Code