4 Commits

Author SHA1 Message Date
Denis 851b7681ff Add held mouse buttons (Left click / Right click toggles) to the Touchpad tab
Two toggle buttons in the free corners of the D-pad press and hold the PC's
left or right mouse button until tapped again, for drag and drop, text
selection and window moves, with the touchpad moving the pointer in between.

- New input action "button" ({button, pressed}); the state carries
  input.buttons. VirtualInput remembers which connection pressed each button.
- A click on a held button is ignored so a touchpad tap does not drop the
  drag; the other button stays usable. Repeating a state is a no-op.
- A held button is always released: when its client disconnects (only its own
  buttons), when the server stops, and in the client when the tab is left or
  the page is hidden.
- Incoming states are set aside for 500 ms after a local tap, so a state
  already in flight cannot undo the toggle for a moment.
- D-pad rows are equal-sized (minmax(0, 1fr)) so the corner buttons do not
  stretch the top row.

tests/test_input.py covers the device logic and the full server (disconnect,
several clients); tests/test_ui_mouse_hold.py drives a real Chromium. Also
checked through the real uinput device with its pointer grabbed exclusively.
README (fr/en) and CLAUDE.md are updated.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-31 09:02:19 +01:00
Denis Defolie df2c9b8933 Add make test-ui: Chromium flows against the real isolated server
New tests/test_ui_flows.py drives headless Chromium through the Media tab
(folders, breadcrumbs, filters, search, opening a hostile file name),
launchers (real launches of a command, a .desktop and a web launcher, live
grid updates) and the /admin page (edit, add, reorder, delete, file
openers used when opening a file). Any uncaught JavaScript exception fails
the test. Four UI mutations were checked to fail their test.

The driver now launches Chromium without any D-Bus session (a first
attempt let it activate real services on the test bus) and records
JavaScript exceptions. wait_for retries while the page is loading, which
fixes a race in test_ui_text_button; the older UI tests register their
cleanups before setup can fail, so a failed setup no longer leaks a
Chromium process.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 16:42:52 +01:00
Denis 2fdb8f4ea0 Explain a greyed "Keyboard" button: show the reason on tap and log it
On a fresh install features.text_input is false, so the Keyboard button of the
Remote tab was greyed out, with the reason only in a title tooltip that cannot
be read on a tablet.

- The button now uses aria-disabled instead of disabled (same look); tapping
  it shows the reason in a toast instead of doing nothing.
- The server logs "text entry enabled" or "text entry unavailable: <reason>"
  at startup.
- README (fr/en): text entry is listed as optional and off by default in the
  installation steps, and the possible reasons are documented.

tests/test_ui_text_button.py (real Chromium) and a startup-log test in
tests/test_text.py cover it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 19:05:39 +01:00
Denis 1de5685338 Add thumbnails, name search and a title/image in the Playing tab; keep player controls visible
- Thumbnails (ffmpeg, optional): square crops of images, a frame or poster of
  videos, embedded or folder cover of sounds, cached on disk; /thumb route
  protected by the token like /art. [media] thumbnails = false disables it.
- Name search in the Media tab (server side, accents and case ignored, all
  words required, bounded by result count, scanned entries and time).
- Playing tab: title and picture for files of the library (also when the
  player gives none), and a "last opened file" card when no player runs.
- The player controls and the volume bar never leave the visible area:
  sticky controls and height breakpoints; tests/test_ui_layout.py measures
  13 window sizes in a real Chromium driven over DevTools (tests/uidriver.py).
- Static files are served under /static/<version>/ and pages are revalidated,
  so a tablet no longer keeps an old interface from its heuristic cache.
- Documentation (README fr/en, CLAUDE.md, config.example.toml, make deps).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 16:28:14 +01:00