Repository navigation
Conversation
Center a newly focused column only when it cannot share the screen with the previously focused column. Fitting is measured over the usable viewport with gaps, and an exact fit counts as fitting. Each workspace records the selected window its scroll target was resolved for, plus the centering decision, so recomputation, column moves and learned widths keep the decision until the selection changes. Expose Center on overflow in Layout Settings and document the mode. Closes #102
centering_check.sh opens scratch TextEdit columns on the trailing workspace and proves never, always and on-overflow at an exact fit and an overflow, driven by the CLI or by real hotkeys.
There was a problem hiding this comment.
All reported issues were addressed across 16 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Adds a small, opt-in focused-column centering mode while preserving existing defaults and behavior, with configuration, UI, persistence compatibility, and runtime tests covering the new path. The remaining concerns are incremental boundary-test improvements rather than evidence of a material production risk. You can add or adjust custom eligibility rules. Learn more. |
Record the on-overflow decision in every centering mode so switching modes without refocusing keeps it. Pin the centering journey's column widths and presets, create the [layout] table or config file when absent, and send hotkeys with the configured modifier. Clarify the docs.
This branch has not been deployed
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.
Adds
center_focused_column = "on-overflow". When focus moves to another column, Defi centers the new column only if it cannot share the screen with the column that was focused before. Otherwise it scrolls just enough to reveal it, like"never". The default stays"never", and"never"/"always"behave as before.Closes #102
Behavior
Workspace.scrollFocus). Later recomputation keeps it: desktop syncs, stale completions, column moves and learned minimum widths. Focusing the selected window again changes nothing.CONFIGURATION.mdunder "Focused column centering".Verification
python3 script/verify.py localpassed on the final head.verify.py desktopon the staged bundle. The first full run had 5 failing tests (hotkeys, Carbon reservations, pointer, keyboard activation) and the second had 1 (native stacking precondition). The sets did not overlap. Each failing test passed when rerun alone on the same build, and the session store restored each time.verify-deficentering_check.sh(new). On this build, it passed all 6 width/mode rows driven by the CLI. It passed again driven by realhyperhotkeys at about 0.8 s spacing, withcaptured=12anddrift=0[]. One daemon remained and the initial workspace was restored.Manual test (about 5 minutes)
<mod>is yourdefault_key_modifier(hyperin your config).center_focused_column = "on-overflow"under[layout]in~/.config/defi/config.toml.<mod>-[to focus the first column, then<mod>-Right. Expected: the second column shows at the right half and nothing scrolls, because two half-width columns fit exactly.<mod>-Rightagain. Expected: the third column is revealed at the right edge, not centered.<mod>-[, then<mod>-Righttwice quickly. Expected: each step reveals and nothing is centered.<mod>-=(cycle-width next) to make it 0.66 wide. Then press<mod>-[and<mod>-Right. Expected: the second column is centered because the two columns overflow.Note
Add
on-overflowfocused-column centering modeCenterFocusedColumnConfig), runtime (CenterFocusedColumn.init(config:)), core scrolling (focusedColumnScrollTarget), a newScrollFocusmodel field onWorkspace, and the macOS settings UI plus settings search.ScrollFocusrecord viasynchronizeScrollOffsetsin ScrollReconciliation.swift; the recorded on-overflow decision survives mode switches, manual offset changes, and width changes until the selection changes. Default remainsnever.Macroscope summarized 916288c.