Skip to content

Return keyboard focus after an action, and document two README gaps - #10

Merged
ftymoshchuk merged 1 commit into
mainfrom
claude/cool-sagan-yo0prg
Oct 16, 2026
Merged

ftymoshchuk merged 1 commit into
mainfrom
claude/cool-sagan-yo0prg

Conversation

@ftymoshchuk

Copy link
Copy Markdown
Owner

What changes

  • Keyboard focus after an action. Scan folder, Make preview sheets, Make cover and Upscale images disable the action buttons while they run. Disabling the focused button dropped keyboard focus to the page, so a keyboard user ended up at the top and had to Tab all the way back. runExclusive, which every action goes through, now returns focus to the button that started the action, unless focus was moved somewhere else in the meantime.
  • README:
    • POST /api/jobs/scan-folder now lists available_subfolders, which was missing: the folders inside a folder with no images of its own. Since Browse for folders, upscale images, and skip macOS metadata files #9 these leave out hidden folders, __MACOSX and ---Created---.
    • "Behavior defaults" says upscaled images keep their names, so a new run replaces them, where sheets are never overwritten.

Testing

  • ruff check .; pytest (194 tests), including a new test pinning the focus return.
  • In Chromium (Playwright), each case on a fresh page:
    • by keyboard: after Scan, Make sheets and Upscale, focus is back on the button, with its focus ring;
    • by mouse: focus is back on the button without a ring, so nothing changes visually;
    • focus moved into the folder field during a scan stays there;
    • on main before this change, focus ended on the page body every time.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FtCFQJ6wEFf5pZSL2HSE8G


Generated by Claude Code

Every action runs through runExclusive, which disables the action
buttons while it works. Disabling the focused button dropped keyboard
focus to the page, so after Scan folder, Make preview sheets, Make cover
or Upscale images a keyboard user was back at the top. Focus now returns
to the button that started the action, unless it was moved elsewhere in
the meantime. Checked in Chromium: by keyboard it comes back with its
focus ring, by mouse without one, as before.

The README gains two things it was missing: scan-folder's
available_subfolders field, and that upscaling again replaces its
earlier files, where sheets are never overwritten.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FtCFQJ6wEFf5pZSL2HSE8G
@ftymoshchuk
ftymoshchuk merged commit c7f6c75 into main Oct 16, 2026
5 checks passed
@ftymoshchuk
ftymoshchuk deleted the claude/cool-sagan-yo0prg branch October 16, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants