Step the details column out of the way when the chat has no room #16

Closed
asxpi wants to merge 0 commits from asxpi/anotherim-js:fix/details-column-narrow into develop
First-time contributor

Above the 720px phone layout the window is three panes in a row: the list, the chat, and the details or people column at a fixed 340px. Only the chat shrinks. Narrowing the window with a room's people open squeezed the chat to a sliver until only the list and the people were left. The column decided once, as it opened, whether it fit, so a resize never took it away.

Change

  • app-shell.ts measures, as the window or the list's divider moves (a ResizeObserver on the panes and the list), whether the panes leave the chat 380px (MIN_CHAT_BESIDE_COLUMN) beside the column, and passes that to details().setRoom().
  • state/details.ts: without room, the column is kept but not drawn (visible). It comes back with the room, on the page it showed. Meanwhile the People button and Details open their sheets, as at phone width. Esc doesn't take a column that isn't on screen.
  • chat-view.ts: the People button reads as pressed only while the column is on screen.

Tests

  • details-pane.test.ts: the room lost and back, the People button without room (sheet, column kept), and the side panel giving way to the sheet without room. 49/49 in the details and people files.
  • Two WebKit smoke screens with a room's people up: at 1300px the column is there and the chat keeps 380px; at 900px the column steps out of the way and the chat isn't a sliver.
  • make test-ui: 2176 passed. The one failure is a thread-footer case, and the two unhandled errors are from chat-follow.test.ts; both fail only under the full suite's load and pass alone.
  • Checked by hand in a local Flatpak build of 0.5.4 on GNOME.

🤖 Generated with Claude Code

Above the 720px phone layout the window is three panes in a row: the list, the chat, and the details or people column at a fixed 340px. Only the chat shrinks. Narrowing the window with a room's people open squeezed the chat to a sliver until only the list and the people were left. The column decided once, as it opened, whether it fit, so a resize never took it away. **Change** - `app-shell.ts` measures, as the window or the list's divider moves (a `ResizeObserver` on the panes and the list), whether the panes leave the chat 380px (`MIN_CHAT_BESIDE_COLUMN`) beside the column, and passes that to `details().setRoom()`. - `state/details.ts`: without room, the column is kept but not drawn (`visible`). It comes back with the room, on the page it showed. Meanwhile the People button and Details open their sheets, as at phone width. Esc doesn't take a column that isn't on screen. - `chat-view.ts`: the People button reads as pressed only while the column is on screen. **Tests** - `details-pane.test.ts`: the room lost and back, the People button without room (sheet, column kept), and the side panel giving way to the sheet without room. 49/49 in the details and people files. - Two WebKit smoke screens with a room's people up: at 1300px the column is there and the chat keeps 380px; at 900px the column steps out of the way and the chat isn't a sliver. - `make test-ui`: 2176 passed. The one failure is a thread-footer case, and the two unhandled errors are from `chat-follow.test.ts`; both fail only under the full suite's load and pass alone. - Checked by hand in a local Flatpak build of 0.5.4 on GNOME. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Above the 720px phone layout the window is three panes in a row: the
list, the chat and the details or people column at a fixed 340px.
Only the chat shrinks, so narrowing the window with a room's people
up squeezed it to a sliver until only the list and the people were
left, and the column, decided once as it opened, never went.

The shell now measures, as the window or the list's divider moves,
whether the panes leave the chat 380px (MIN_CHAT_BESIDE_COLUMN)
beside the column, and tells details().setRoom. Without room the
column is kept but not drawn (visible), and comes back with the room
on the page it showed; meanwhile the People button and Details open
their sheets as at phone width, and Esc does not take a column that
is not on screen.

Tests: details-pane.test.ts (room lost and back, the People button
and the side panel without room), and two WebKit smoke screens with
a room's people up at 1300 and 900px.

Assisted-by: Claude:opus-5-5
Owner

Reviewed and merged into develop by hand with merge commit c9530aa9 (the forge does not mark a hand merge as merged, so this PR is closed here). One addition on top: the ResizeObserver followed the panes element only once, so after the lock screen or the welcome had replaced the panes the column would no longer step out of the way; updated() now moves the watch to the new panes and measures them at once. It will be in the next release.

Reviewed and merged into develop by hand with merge commit c9530aa9 (the forge does not mark a hand merge as merged, so this PR is closed here). One addition on top: the ResizeObserver followed the panes element only once, so after the lock screen or the welcome had replaced the panes the column would no longer step out of the way; updated() now moves the watch to the new panes and measures them at once. It will be in the next release.
ann closed this pull request 2026-10-16 09:08:42 +00:00

Pull request closed

Sign in to join this conversation.
No description provided.