Task 18: Main layout: guild rail, channel sidebar, header, member list (#18) #57

Manually merged
charles merged 0 commits from task/18-ui-main-layout into foundation 2026-11-11 18:28:14 +00:00
Owner

What this builds

  • screens::main::model(&App) -> MainModel { home, guilds: Vec<GuildRailItem { id, name, icon_url, acronym, selected, unread, mentions, unavailable }>, sidebar: SidebarModel, user, header: HeaderModel { channel_name, topic, kind, has_members, members_open }, members: Option<Vec<MemberGroupModel>> }, computed through the core selectors (guild_order, channel_tree, dm_list, member_list, unread, mention_count, display_name). With no guild selected the sidebar is the DM list. members is None when the list is toggled off or the DM list is open.
  • screens::main::view(&MainModel, &Local) -> Element<main::Message>: guild rail (72 px, DM button, unread pill / selected bar on the left edge, red mention badge on the icon's corner, name tooltip), channel sidebar (guild name, categories, channel rows with type icon, unread pill and mention badge, user area with the settings gear), header (56 px: icon, name, topic, member list toggle), member list (264 px: groups with counts, presence dot, owner crown, offline rows dimmed) and an empty chat surface for Task 20. Sizes come from Tokens::layout and the web app's CSS modules (each constant names its rule); colours are tokens only.
  • enum main::Message { SelectGuild(Option<Snowflake>), SelectChannel(Snowflake), SidebarResized(u16), ToggleMembers, OpenSettings } with Message::into_action() -> UserAction; the shell sends it as CoreEvent::User.
  • acronym(name): the web app's getGuildAcronym rule (initials of words, possessive 's dropped, punctuation kept), capped at 4, ? when empty.
  • Widgets: badge::mention / badge::format_count (MentionBadge.module.css, "99+", "2K"), tooltip::tooltip_for (Tooltip.module.css), resizable_split::resizable_split (custom widget: reports the width asked for while its edge is dragged, keeps none itself; core clamps to 200..=480).
  • app.rs: a logged-in session shows the main screen instead of Task 17's placeholder.

How it was tested

  • crates/fluxer-ui/tests/main_model.rs (9 tests), written first and seen failing: the three the plan names (main_model_marks_selected_guild_and_channel, acronym_for_guild_without_icon, member_list_hidden_when_toggled_off) plus the channel tree with kinds, unread/mentions on rail and sidebar, the DM list, a guild coming back from an outage, a logged-out store, and the message-to-UserAction mapping. They drive the real store through App::apply with the READY / GUILD_CREATE fixtures.
  • Unit tests for format_count and for the split's requested_width (clamping, NaN, inverted range).
  • Manual, under Xvfb with the tiny-skia renderer and xdotool: fluxer --devserver logs in and shows the DM list; clicking the guild and #general selects them; dragging the sidebar edge resizes it (320 to 240); the header button hides the member list; hovering a guild shows its tooltip; Ctrl-C exits with status 0.
  • FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci is green locally.

Screenshots of the native client: docs/screenshots/main-empty.png (after login, DM list) and docs/screenshots/main-channel.png (guild and channel selected). There is no Electron side-by-side: it needs a session on the live instance, which this task may not touch.

Deviations from the plan

  • Selected / hovered guild icon radius is 30 % of the icon (13.2 px), not 16 px: that is what GuildsLayout.module.css in the fork checkout says (.guildIconSelected { border-radius: 30% }), and the plan gives the web app as its source. One constant (SELECTED_RADIUS_RATIO) if 16 px is wanted.
  • The spec's §5.1 says "channel list (240 px)"; the plan's and the fork's 320 px default (--layout-sidebar-width: 20rem) is used.
  • acronym caps at 4 as the plan says; the web app does not cap (it shrinks the font).
  • MainModel has more than the plan lists: home (the DM button), user (user area), and extra fields on HeaderModel, GuildRailItem (unavailable), SidebarModel (title, width, sections). The plan's names and fields are unchanged.
  • Guild icons and member avatars are drawn as initials: the image cache is Task 21 (not on this branch). GuildRailItem::icon_url ({media}/icons/{guild}/{hash}.webp?size=96) is ready for it.
  • The DM button uses the ChatTeardrop icon; the web app shows the Fluxer logo there, which is not in the bundled icon set.
  • The tooltip has no drop shadow: with the tiny-skia renderer the shadow stayed on screen after the tooltip closed.
  • Categories do not collapse, and hover states are instant (no 70 ms transitions).
  • "Log out" is gone with Task 17's placeholder; until the settings screen (Task 22) there is no logout in the UI. The gear emits OpenSettings(None), which nothing draws yet.
  • Outside the Files list: crates/fluxer-ui/Cargo.toml (fluxer-proto moved from dev-dependencies to dependencies for Snowflake / UserStatus in the model; no new crate), src/app.rs, src/screens/mod.rs, src/widgets/mod.rs, README.md, docs/screenshots/.

Stacked on: task/17-ui-shell-login, task/9-core-guilds-channels, task/10-core-messages-readstate, task/11-core-presence-ui

Closes #18

🤖 Generated with Claude Code

## What this builds - `screens::main::model(&App) -> MainModel { home, guilds: Vec<GuildRailItem { id, name, icon_url, acronym, selected, unread, mentions, unavailable }>, sidebar: SidebarModel, user, header: HeaderModel { channel_name, topic, kind, has_members, members_open }, members: Option<Vec<MemberGroupModel>> }`, computed through the core selectors (`guild_order`, `channel_tree`, `dm_list`, `member_list`, `unread`, `mention_count`, `display_name`). With no guild selected the sidebar is the DM list. `members` is `None` when the list is toggled off or the DM list is open. - `screens::main::view(&MainModel, &Local) -> Element<main::Message>`: guild rail (72 px, DM button, unread pill / selected bar on the left edge, red mention badge on the icon's corner, name tooltip), channel sidebar (guild name, categories, channel rows with type icon, unread pill and mention badge, user area with the settings gear), header (56 px: icon, name, topic, member list toggle), member list (264 px: groups with counts, presence dot, owner crown, offline rows dimmed) and an empty chat surface for Task 20. Sizes come from `Tokens::layout` and the web app's CSS modules (each constant names its rule); colours are tokens only. - `enum main::Message { SelectGuild(Option<Snowflake>), SelectChannel(Snowflake), SidebarResized(u16), ToggleMembers, OpenSettings }` with `Message::into_action() -> UserAction`; the shell sends it as `CoreEvent::User`. - `acronym(name)`: the web app's `getGuildAcronym` rule (initials of words, possessive `'s` dropped, punctuation kept), capped at 4, `?` when empty. - Widgets: `badge::mention` / `badge::format_count` (`MentionBadge.module.css`, "99+", "2K"), `tooltip::tooltip_for` (`Tooltip.module.css`), `resizable_split::resizable_split` (custom widget: reports the width asked for while its edge is dragged, keeps none itself; core clamps to 200..=480). - `app.rs`: a logged-in session shows the main screen instead of Task 17's placeholder. ## How it was tested - `crates/fluxer-ui/tests/main_model.rs` (9 tests), written first and seen failing: the three the plan names (`main_model_marks_selected_guild_and_channel`, `acronym_for_guild_without_icon`, `member_list_hidden_when_toggled_off`) plus the channel tree with kinds, unread/mentions on rail and sidebar, the DM list, a guild coming back from an outage, a logged-out store, and the message-to-`UserAction` mapping. They drive the real store through `App::apply` with the `READY` / `GUILD_CREATE` fixtures. - Unit tests for `format_count` and for the split's `requested_width` (clamping, NaN, inverted range). - Manual, under Xvfb with the tiny-skia renderer and xdotool: `fluxer --devserver` logs in and shows the DM list; clicking the guild and `#general` selects them; dragging the sidebar edge resizes it (320 to 240); the header button hides the member list; hovering a guild shows its tooltip; Ctrl-C exits with status 0. - `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` is green locally. Screenshots of the native client: `docs/screenshots/main-empty.png` (after login, DM list) and `docs/screenshots/main-channel.png` (guild and channel selected). There is no Electron side-by-side: it needs a session on the live instance, which this task may not touch. ## Deviations from the plan - Selected / hovered guild icon radius is 30 % of the icon (13.2 px), not 16 px: that is what `GuildsLayout.module.css` in the fork checkout says (`.guildIconSelected { border-radius: 30% }`), and the plan gives the web app as its source. One constant (`SELECTED_RADIUS_RATIO`) if 16 px is wanted. - The spec's §5.1 says "channel list (240 px)"; the plan's and the fork's 320 px default (`--layout-sidebar-width: 20rem`) is used. - `acronym` caps at 4 as the plan says; the web app does not cap (it shrinks the font). - `MainModel` has more than the plan lists: `home` (the DM button), `user` (user area), and extra fields on `HeaderModel`, `GuildRailItem` (`unavailable`), `SidebarModel` (`title`, `width`, `sections`). The plan's names and fields are unchanged. - Guild icons and member avatars are drawn as initials: the image cache is Task 21 (not on this branch). `GuildRailItem::icon_url` (`{media}/icons/{guild}/{hash}.webp?size=96`) is ready for it. - The DM button uses the `ChatTeardrop` icon; the web app shows the Fluxer logo there, which is not in the bundled icon set. - The tooltip has no drop shadow: with the tiny-skia renderer the shadow stayed on screen after the tooltip closed. - Categories do not collapse, and hover states are instant (no 70 ms transitions). - "Log out" is gone with Task 17's placeholder; until the settings screen (Task 22) there is no logout in the UI. The gear emits `OpenSettings(None)`, which nothing draws yet. - Outside the Files list: `crates/fluxer-ui/Cargo.toml` (`fluxer-proto` moved from dev-dependencies to dependencies for `Snowflake` / `UserStatus` in the model; no new crate), `src/app.rs`, `src/screens/mod.rs`, `src/widgets/mod.rs`, `README.md`, `docs/screenshots/`. Stacked on: task/17-ui-shell-login, task/9-core-guilds-channels, task/10-core-messages-readstate, task/11-core-presence-ui Closes #18 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(ui): generated theme tokens, fonts and icons
All checks were successful
ci / Windows (x64) (push) Successful in 22s
ci / Windows (x64) (pull_request) Successful in 15s
ci / Linux (x86_64) (push) Successful in 1m22s
ci / Linux (x86_64) (pull_request) Successful in 1m23s
64430a109d
- xtask gen-theme --fork <path>: parses the Electron app's colour system,
  globals and message-layout CSS into crates/fluxer-ui/src/theme/tokens.rs
  (hsl/hsla/rgb/hex, saturation-factor calc, var() fallbacks, color-mix in
  srgb and oklab; rem to px).
- fluxer-ui::theme: tokens (DARK), palette::Theme with iced's Base and
  widget catalogs, fonts (Fluxer Sans/Mono as TTF) and icons (Phosphor SVGs).
- Adds iced 0.14 to the workspace; deny.toml allows BSL-1.0 and CC0-1.0 and
  ignores three unmaintained-crate advisories that iced pulls in.

Refs #16

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Merge origin/foundation into task/16-ui-theme-fonts-icons
All checks were successful
ci / Windows (x64) (push) Successful in 1m32s
ci / Windows (x64) (pull_request) Successful in 38s
ci / Linux (x86_64) (push) Successful in 1m28s
ci / Linux (x86_64) (pull_request) Successful in 1m34s
897ebaae93
Conflicts in xtask (both sides implemented dispatch stubs: gen-theme here,
vendor-spec/spec-check on foundation) and Cargo.lock resolved as the union.

Refs #16

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Merge origin/foundation into task/16-ui-theme-fonts-icons
All checks were successful
ci / Windows (x64) (push) Successful in 44s
ci / Linux (x86_64) (push) Successful in 1m41s
ci / Windows (x64) (pull_request) Successful in 52s
ci / Linux (x86_64) (pull_request) Successful in 1m31s
301b889ef7
Mechanical conflicts: both sides added workspace dependencies (iced, futures-util)
and Cargo.lock entries.

Refs #16

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Refs #8

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
feat(core): store skeleton and session reducer
All checks were successful
ci / Windows (x64) (push) Successful in 42s
ci / Linux (x86_64) (push) Successful in 1m0s
ci / Windows (x64) (pull_request) Successful in 41s
ci / Linux (x86_64) (pull_request) Successful in 1m5s
cacedcbbf7
Refs #8

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Adds the gateway crate's dependencies (rustls, rustls-native-certs and zstd are
new to the workspace; Task 7 names tokio-tungstenite with rustls and zstd).

Refs #7

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Refs #7

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Refs #7

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Refs #7

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Refs #9

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Refs #11

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
feat(core): presence, users and ui state
All checks were successful
ci / Windows (x64) (push) Successful in 39s
ci / Windows (x64) (pull_request) Successful in 39s
ci / Linux (x86_64) (push) Successful in 1m7s
ci / Linux (x86_64) (pull_request) Successful in 1m3s
f4ce82e123
Refs #11

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
feat(gateway): websocket transport with zstd streaming
All checks were successful
ci / Windows (x64) (push) Successful in 57s
ci / Windows (x64) (pull_request) Successful in 48s
ci / Linux (x86_64) (push) Successful in 1m3s
ci / Linux (x86_64) (pull_request) Successful in 1m3s
e60021584a
Refs #7

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
feat(core): guild and channel reducers and sidebar selectors
All checks were successful
ci / Windows (x64) (pull_request) Successful in 45s
ci / Windows (x64) (push) Successful in 43s
ci / Linux (x86_64) (pull_request) Successful in 1m3s
ci / Linux (x86_64) (push) Successful in 1m10s
e753f32ec6
Refs #9

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Refs #10

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
feat(core): messages, typing and read state
All checks were successful
ci / Windows (x64) (push) Successful in 44s
ci / Windows (x64) (pull_request) Successful in 44s
ci / Linux (x86_64) (push) Successful in 1m4s
ci / Linux (x86_64) (pull_request) Successful in 1m3s
38a4f01a14
Refs #10

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Refs #13

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
# Conflicts:
#	crates/fluxer-core/README.md
#	crates/fluxer-core/src/app.rs
#	crates/fluxer-core/src/lib.rs
#	crates/fluxer-core/src/selectors/mod.rs
# Conflicts:
#	crates/fluxer-core/README.md
#	crates/fluxer-core/src/app.rs
#	crates/fluxer-core/src/lib.rs
#	crates/fluxer-core/src/selectors/mod.rs
feat(devserver): fixture-backed API and gateway for tests
All checks were successful
ci / Windows (x64) (pull_request) Successful in 1m11s
ci / Linux (x86_64) (pull_request) Successful in 1m20s
ci / Windows (x64) (push) Successful in 57s
ci / Linux (x86_64) (push) Successful in 1m10s
4c00cf12fd
Refs #13

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Refs #12

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
feat(platform,core): settings, keyring token and sqlite cache
Some checks failed
ci / Windows (x64) (push) Failing after 23s
ci / Linux (x86_64) (push) Failing after 56s
ci / Windows (x64) (pull_request) Failing after 13s
ci / Linux (x86_64) (pull_request) Failing after 54s
6eb27db77c
Core: PersistOp/PersistResult/LocalSettings in fluxer_core::persist, the
stored-token login (Loaded -> Discover -> Me -> ConnectGateway), cached READY
data marked App::stale until the live READY, and the CacheReady/CacheMessages/
SaveSettings writes.

Platform: Paths, settings.toml (defaults on missing, .bad on invalid), the
keyring token, the SQLite cache (rebuilt when corrupt or of another schema
version, in memory if the file is unusable) and Store, which ties them to
PersistOp for the runtime.

New dependencies: directories, keyring, rusqlite (bundled), toml, base64,
getrandom, tempfile (dev), keyring-core (dev, mock store).

Refs #12

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
chore(deps): bump num-bigint 0.4.7 -> 0.4.8 (0.4.7 was yanked)
All checks were successful
ci / Windows (x64) (push) Successful in 1m2s
ci / Linux (x86_64) (push) Successful in 1m20s
ci / Windows (x64) (pull_request) Successful in 51s
ci / Linux (x86_64) (pull_request) Successful in 1m18s
6b043c3a08
cargo deny (yanked = deny) failed on both runners for run 71/72: num-bigint 0.4.7,
a transitive dependency of keyring's Secret Service store, was yanked from crates.io.
Lockfile-only patch bump; no manifest change.

Refs #12

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
# Conflicts:
#	Cargo.lock
# Conflicts:
#	Cargo.lock
#	Cargo.toml
Refs #14

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
ApiClient::with_observer shows each exchange that got a response (no
headers); Connection::connect_with_tap shows each frame received and
sent. Both are off unless asked for.

Refs #14

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
feat(app): effect runtime, config, logging and record mode
Some checks failed
ci / Windows (x64) (pull_request) Failing after 19s
ci / Windows (x64) (push) Failing after 4s
ci / Linux (x86_64) (pull_request) Successful in 1m37s
ci / Linux (x86_64) (push) Successful in 1m43s
a2ce504001
Refs #14

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
ci(windows): free the build cache when the runner disk is low
All checks were successful
ci / Linux (x86_64) (push) Successful in 1m9s
ci / Windows (x64) (push) Successful in 1m33s
ci / Linux (x86_64) (pull_request) Successful in 1m12s
ci / Windows (x64) (pull_request) Successful in 1m21s
6ada26ce7e
The persistent Windows runner ran out of space on C: (os error 112). Log free
space, remove this project's own target dirs when it drops below 30 GB, and
turn off incremental compilation there. Also correct CLAUDE.md: one target dir
per worktree, and run the screenshot step locally before pushing.

Refs #51

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Merge remote-tracking branch 'origin/ci/51-windows-disk-space' into task/14-app-runtime
All checks were successful
ci / Linux (x86_64) (push) Successful in 1m49s
ci / Windows (x64) (push) Successful in 2m59s
ci / Linux (x86_64) (pull_request) Successful in 1m53s
ci / Windows (x64) (pull_request) Successful in 2m46s
d0f3c10f86
# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	deny.toml
feat(ui): iced shell and login screen
All checks were successful
ci / Linux (x86_64) (push) Successful in 2m18s
ci / Windows (x64) (push) Successful in 3m51s
ci / Linux (x86_64) (pull_request) Successful in 2m9s
ci / Windows (x64) (pull_request) Successful in 3m38s
9e1bc0a481
fluxer_ui::run shows the runtime's snapshots in an iced window and sends
what the user does back as CoreEvents; the login screen covers the
instance field, credentials, the TOTP step and one text per AuthError
(captcha included). apps/fluxer launches it in place of the headless loop.

Refs #17

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
feat(ui): main three-pane layout
All checks were successful
ci / Linux (x86_64) (push) Successful in 2m12s
ci / Windows (x64) (push) Successful in 3m50s
ci / Linux (x86_64) (pull_request) Successful in 2m12s
ci / Windows (x64) (pull_request) Successful in 3m12s
f9183ef0ef
screens::main draws the guild rail, the resizable channel sidebar, the
channel header and the member list from main::model(&App), which reads
the store through the core selectors. Its messages map to UserActions.
New widgets: mention badge, tooltip card and resizable split. The shell
shows the main screen once logged in.

Refs #18

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Author
Owner

Review: Task 18 (ui-main-layout), commit f9183ef

Reviewed 9e1bc0a..f9183ef cold. Local FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci: green (exit 0; tests/main_model.rs 9/9; remote runners not checked).

Checks

  1. Plan tests: main_model_marks_selected_guild_and_channel, acronym_for_guild_without_icon (initials, max 4: "the quick brown fox jumps" -> "tqbf"), member_list_hidden_when_toggled_off all exist and assert what the plan says.
  2. Interfaces: main::model(&App) -> MainModel, GuildRailItem { id, name, icon_url: Option<Url>, acronym, selected, unread, mentions }, SidebarModel, HeaderModel { channel_name, topic }, members: Option<Vec<MemberGroupModel>>, view(&MainModel, &Local) -> Element<Message>, Message { SelectGuild(Option<Snowflake>), SelectChannel(Snowflake), SidebarResized(u16), ToggleMembers, OpenSettings } are present as written; extra fields are additive. The selectors named in Consumes are all used.
  3. Invariants: no I/O in fluxer-ui (fluxer-proto moved dev-dep -> dep, no new crate); fluxer-core untouched; no tokens/secrets; server data paths are panic-free (icon hash validated to one path segment, saturating sums, ACRONYM_SIZES index clamped, requested_width handles NaN and inverted ranges, layout tolerates a missing child tree).
  4. No Review Focus item belongs to this task.

Findings (all minor, none blocking)

  • minor — widgets/resizable_split.rs: every CursorMoved of a drag publishes SidebarResized, and fluxer-core/src/persist.rs turns each changed width into Effect::Persist(SaveSettings). One drag is therefore up to ~280 settings writes. Publish on release (or debounce in the runtime) — follow-up.
  • minor — widgets/resizable_split.rs: a drag ends only on ButtonReleased(Left) seen by the widget. If the button is released outside the window (or the window loses focus mid-drag), grab_offset stays set and the next pointer movement resizes the sidebar without a button held, and panes get no CursorMoved until the next click. Also end the drag on CursorLeft/window unfocus, or check the button state.
  • minor — widgets/resizable_split.rs: the 8 px grab strip takes presses from the rightmost 4 px of the sidebar (where its scrollbar is) and the leftmost 4 px of the content pane. Acceptable, but worth knowing for Task 20.
  • minor — screens/main/model.rs: model() runs on every view call and calls channel_tree once per guild (plus once for the selected one) and member_list; this is O(all channels) per frame. Fine for the fixtures, will want caching in the snapshot for large accounts.
  • minor — screens/main/model.rs acronym: diverges from the web app's getGuildAcronym for decomposed combining marks (documented) and by capping at 4 chars where punctuation counts toward the cap ("a-b-c" -> "a-b-"). The cap is the plan's; the trailing punctuation is cosmetic.
  • minor — screens/main/guild_rail.rs: selected radius is 30% (13.2 px), not the plan's 16 px. It matches the fork's .guildIconSelected { border-radius: 30% }, which CLAUDE.md ("clone, do not reinterpret") favours; needs Charles's nod since the plan says 16.
  • minor — app.rs: the Task 17 "Log out" button is removed and the gear emits OpenSettings(None), which nothing draws, so there is no way to log out from the UI until Task 22. Not a plan violation, but a regression for manual testing in between.
  • minor — plan Step asks for main-empty.png vs Electron; only the native screenshots are attached, no side-by-side (needs the live instance).
  • minor — README.md/Cargo.toml/app.rs/screens/mod.rs/widgets/mod.rs are outside the task's Files list; the changes are the necessary wiring. The Cargo.toml hunk may conflict mechanically with Tasks 19/21.

Verdict: APPROVE — zero blocking findings, local ci green.

## Review: Task 18 (ui-main-layout), commit f9183ef Reviewed `9e1bc0a..f9183ef` cold. Local `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci`: **green** (exit 0; `tests/main_model.rs` 9/9; remote runners not checked). **Checks** 1. Plan tests: `main_model_marks_selected_guild_and_channel`, `acronym_for_guild_without_icon` (initials, max 4: "the quick brown fox jumps" -> "tqbf"), `member_list_hidden_when_toggled_off` all exist and assert what the plan says. 2. Interfaces: `main::model(&App) -> MainModel`, `GuildRailItem { id, name, icon_url: Option<Url>, acronym, selected, unread, mentions }`, `SidebarModel`, `HeaderModel { channel_name, topic }`, `members: Option<Vec<MemberGroupModel>>`, `view(&MainModel, &Local) -> Element<Message>`, `Message { SelectGuild(Option<Snowflake>), SelectChannel(Snowflake), SidebarResized(u16), ToggleMembers, OpenSettings }` are present as written; extra fields are additive. The selectors named in Consumes are all used. 3. Invariants: no I/O in fluxer-ui (fluxer-proto moved dev-dep -> dep, no new crate); fluxer-core untouched; no tokens/secrets; server data paths are panic-free (icon hash validated to one path segment, saturating sums, `ACRONYM_SIZES` index clamped, `requested_width` handles NaN and inverted ranges, layout tolerates a missing child tree). 4. No Review Focus item belongs to this task. **Findings (all minor, none blocking)** - minor — `widgets/resizable_split.rs`: every `CursorMoved` of a drag publishes `SidebarResized`, and `fluxer-core/src/persist.rs` turns each changed width into `Effect::Persist(SaveSettings)`. One drag is therefore up to ~280 settings writes. Publish on release (or debounce in the runtime) — follow-up. - minor — `widgets/resizable_split.rs`: a drag ends only on `ButtonReleased(Left)` seen by the widget. If the button is released outside the window (or the window loses focus mid-drag), `grab_offset` stays set and the next pointer movement resizes the sidebar without a button held, and panes get no `CursorMoved` until the next click. Also end the drag on `CursorLeft`/window unfocus, or check the button state. - minor — `widgets/resizable_split.rs`: the 8 px grab strip takes presses from the rightmost 4 px of the sidebar (where its scrollbar is) and the leftmost 4 px of the content pane. Acceptable, but worth knowing for Task 20. - minor — `screens/main/model.rs`: `model()` runs on every `view` call and calls `channel_tree` once per guild (plus once for the selected one) and `member_list`; this is O(all channels) per frame. Fine for the fixtures, will want caching in the snapshot for large accounts. - minor — `screens/main/model.rs` `acronym`: diverges from the web app's `getGuildAcronym` for decomposed combining marks (documented) and by capping at 4 chars where punctuation counts toward the cap ("a-b-c" -> "a-b-"). The cap is the plan's; the trailing punctuation is cosmetic. - minor — `screens/main/guild_rail.rs`: selected radius is 30% (13.2 px), not the plan's 16 px. It matches the fork's `.guildIconSelected { border-radius: 30% }`, which CLAUDE.md ("clone, do not reinterpret") favours; needs Charles's nod since the plan says 16. - minor — `app.rs`: the Task 17 "Log out" button is removed and the gear emits `OpenSettings(None)`, which nothing draws, so there is no way to log out from the UI until Task 22. Not a plan violation, but a regression for manual testing in between. - minor — plan Step asks for `main-empty.png` vs Electron; only the native screenshots are attached, no side-by-side (needs the live instance). - minor — `README.md`/`Cargo.toml`/`app.rs`/`screens/mod.rs`/`widgets/mod.rs` are outside the task's Files list; the changes are the necessary wiring. The Cargo.toml hunk may conflict mechanically with Tasks 19/21. **Verdict: APPROVE** — zero blocking findings, local ci green.
charles manually merged commit 24e7c9d137 into foundation 2026-11-11 18:28:14 +00:00
Sign in to join this conversation.
No description provided.