Skip to content

feat(app): settings in parts, with Enter to send, panels that follow the bot and less motion - #41

Merged
httpsphl merged 3 commits into
mainfrom
feat/settings-sections
Sep 29, 2026
Merged

httpsphl merged 3 commits into
mainfrom
feat/settings-sections

Conversation

@httpsphl

Copy link
Copy Markdown
Owner

What

Settings now lists its parts on the left: General, Chat, Appearance and About. Three choices are new:

  • Enter sends the message (Chat, on by default). When it is off, Enter starts a new line and Ctrl+Enter sends. The composer's hint says so.
  • Open the browser and screens when a bot starts using them (Chat, on by default). When it is off, the panels no longer open by themselves; only the dot on their buttons shows it.
  • Less motion (Appearance, off by default). It stills the window the way Windows does when its animation effects are off, without changing Windows.

General holds the background switches from #40 and the language.

How

  • One place for the app's choices: shell/prefs.ts keeps them in localStorage, like the theme, with one typed entry each (whenClosed, enterSends, followBot, lessMotion) and a usePref hook. whenClosed moved there from closing.ts.
  • Less motion: it marks the root with data-motion="less".
    • motion-less.css repeats the reduced-motion rules for that attribute. motion.css does not grow.
    • reducedMotion() checks the attribute too, so view transitions stop as well.
    • It is also applied before the first paint.
  • Spec: 15.1 and 15.3 updated.

Tests

  • pnpm check passes (162 tests).
  • New tests:
    • Ctrl+Enter sends while Enter does not, when chosen.
    • The browser and screens stay behind their buttons, when chosen.
    • Less motion marks the root and turns reducedMotion() on.
  • Existing tests now open the right part of Settings.
  • Looked at each part in the preview.

…the bot and less motion as choices

Settings lists its parts on the left: General (the background switches
and the language), Chat, Appearance and About. Chat gets "Enter sends the
message" (off, Ctrl+Enter sends and Enter starts a line) and "Open the
browser and screens when a bot starts using them"; Appearance gets "Less
motion", which marks the root so motion-less.css and reducedMotion()
still the window as Windows would. The app's own choices share one prefs
module in localStorage.
A Select in the look of the app's menus: a button with the choice opens the list under it; the arrow keys, Enter and Escape work, and Escape closes only the list, not the dialog. The language moves to the top of General, so the list opens with room.
…es test room

The Select test named its value type, so onChange keeps it. The routines form test passes alone and ran past 5 s in the full suite; it gets 15 s, as on the tray branch.
@httpsphl
httpsphl merged commit 8efda22 into main Sep 29, 2026
3 checks passed
@httpsphl httpsphl mentioned this pull request Sep 30, 2026
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.

1 participant