Make focus dimming opt-in and end regions at H3 - #78
Merged
Merged
Conversation
Focus mode's dimming is the one piece of the mode that rewrites the page rather than the chrome around it, so it now defaults off — ⌥⌘F still hides the chrome, goes fullscreen and narrows the canvas. When it is switched on, a region ends at H3 rather than at every heading, so an `h4` step inside a section no longer splits it. Also pins dimming on in the focus-mode screenshot manifest, which had been relying on the old default to produce a dimmed shot. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012zJ8wDPAECfboKi7Km47EC
jnahian
marked this pull request as ready for review
September 9, 2026 11:38
Review follow-ups on the opt-in dimming change: - `applyFocusDim` bailed whenever fewer than two headings matched the chosen depth, so at the new `.h3` default a document shaped `# Title` over `####` steps dimmed nothing at all — the first thing a user would see after going and switching the feature on. The depth is now a floor: widen a level at a time until the document has two regions to tell apart. - `bridge.js` still documented and initialised the depth as 4, "the default". - Re-shot `settings/01-window.png` at the new defaults: the dim toggle off and the Region/Dimming rows greyed. It is a `manual: true` shot, so the `capture.sh` run the PR suggested would have skipped it. - The focus-mode caption and its alt text still presented dimming as stock behaviour; they now say the shot has the opt-in setting switched on. - `FocusModeTests` pinned `.any` as its baseline, so nothing exercised the shipped depth. - Settings.swift lost the per-key migration note when the comment was rewritten; an install that enabled dimming but never opened the picker does pick up the new region default. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MDdYaeJzsdtLzvDmy7kZWT
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
Two default changes in Settings → Focus Mode:
h4step inside the section being read no longer splits it. Any heading remains available in the picker.Each key migrates on its own: a stored value survives, an absent one takes the new default. So an install that switched dimming on but never opened the picker keeps its toggle and does widen to H3 or above.
One behaviour change came with the new depth.
applyFocusDimgives up when fewer than two headings match the chosen depth, so at H3 or above a document shaped# Titleover####steps would have dimmed nothing at all. The setting is now a floor: if a document has no headings that coarse, the next deeper level becomes the boundary.Also updated: the focus-mode screenshot manifest (
docs/features/reading.shots.json) had been relying on dimming being on by default to produce its dimmed shot, so dimming is now pinned on there explicitly and the caption says so;docs/assets/screenshots/settings/01-window.pngis re-shot at the new defaults (dim toggle off, Region/Dimming rows greyed); the bundled changelog and shortcut table; and thedocs/pages for reading and settings.Related issue
n/a
Testing
swift test— 316 tests, 0 failures# Title+####document: dimming now lights the title's region and dims the steps, where before the change nothing dimmed.claude/skills/reader-docs/references/manual-shots.md(840px native, same fixtures and geometry)Tests/ReaderMdTests/FocusModeTests.swiftwas updated to match: the defaults test asserts dimming off at.h3, a new test pins the other three switches on, the unknown-stored-depth fallback asserts.h3, and the suite's baseline is the shipped depth rather than.any.Checklist
AppState— none added🤖 Generated with Claude Code
https://claude.ai/code/session_01MDdYaeJzsdtLzvDmy7kZWT