Skip to content

Fix board selector label overlap - #2459

Merged
1 commit merged into
nesquena:masterfrom
franksong2702:franksong2702/fix-board-selector-menu-layout
May 18, 2026
Merged

1 commit merged into
nesquena:masterfrom
franksong2702:franksong2702/fix-board-selector-menu-layout

Conversation

@franksong2702

@franksong2702 franksong2702 commented May 17, 2026 •

Copy link
Copy Markdown
Contributor

Thinking Path

  • Hermes WebUI keeps the Kanban board switcher compact by rendering each board row as label, title, and count.
  • The failing screenshot showed multi-character board labels such as layout-kanban overflowing from the fixed 18px icon slot into the title column.
  • The root cause is layout-level: b.icon is documented as an emoji-ish icon, but existing board metadata can hold short text labels. The row needs to tolerate that without changing board data behavior.
  • This PR fixes the CSS column contract so long labels remain inside their own cell and titles/count badges keep stable spacing.

Closes #2458.

What Changed

  • Changed .kanban-board-switcher-item-icon from a fixed 18px slot to a bounded flex cell with min-width, max-width, overflow:hidden, and ellipsis behavior.
  • Added a static regression test that pins the overflow/ellipsis/max-width invariants for long board labels.
  • Added release-note-ready changelog text.
  • Added generated fake-data before/after screenshots for review evidence.

Why It Matters

The board selector remains readable when board metadata uses colored text labels instead of a single emoji. This keeps the fix scoped to presentation and avoids changing board storage, API payloads, or switch behavior.

Screenshots

Before:

Before

After:

After

Verification

  • PYTHONPATH=$PWD python -m pytest tests/test_kanban_ui_static.py -q — 42 passed.
  • git diff --check origin/master...HEAD — passed.
  • GitHub Actions test (3.11), test (3.12), and test (3.13) — passed on the rebased head.
  • Playwright fixture with fake board data verified positive gaps between columns:
    • layout-kanban: label/title gap 10px, title/count gap 10px.
    • kanban-square: label/title gap 10px, title/count gap 10px.
    • sparkles: label/title gap 10px, title/count gap 10px.

Risks / Follow-ups

  • This only changes the board switcher row layout. It does not rename existing boards or validate board icon metadata.
  • Very long labels are intentionally truncated with ellipsis instead of wrapping, preserving menu height and count alignment.

Model Used

AI assisted: OpenAI Codex (GPT-5) in the Codex desktop app, with local pytest and Playwright CLI verification.

@nesquena nesquena added the hold label May 17, 2026
@franksong2702
franksong2702 force-pushed the franksong2702/fix-board-selector-menu-layout branch from eb82ea6 to 80bed76 Compare May 17, 2026 22:44
@franksong2702
franksong2702 marked this pull request as ready for review May 17, 2026 22:45
@franksong2702

Copy link
Copy Markdown
Contributor Author

Rebased this branch onto current master (f1d399b4 / stage-378), resolved the changelog conflict, and pushed the refreshed head:

  • PR head: 80bed768de828e1c4d8b7d432f7170b0d67eb074
  • Local verification: PYTHONPATH=$PWD python -m pytest tests/test_kanban_ui_static.py -q — 42 passed
  • Local hygiene: git diff --check origin/master...HEAD — passed
  • GitHub Actions on the rebased head: test (3.11), test (3.12), and test (3.13) — passed

I also marked the PR ready for review and refreshed the PR body/screenshots links. I tried to remove the hold label, but GitHub returned 403 Must have admin rights to Repository, so a maintainer will need to clear that label if this is ready to enter the normal review lane.

@nesquena nesquena removed the hold label May 18, 2026
@nesquena-hermes

Copy link
Copy Markdown
Collaborator

Summary

Reading static/style.css:3813 on this branch against origin/master, and the rendering site at static/panels.js:2486-2492 (_renderKanbanBoardMenu), the CSS change matches the diagnosis I posted on #2458 cleanly. The icon column is the right place to defend against a long b.icon string, the new max-width:7.5rem lets short labels like layout-kanban render in full without overlapping the title or the count badge, and the test in tests/test_kanban_ui_static.py pins all the invariants that matter for the regression.

Code reference

The new rule at static/style.css:3816-3823:

.kanban-board-switcher-item-icon{
  display:block;
  font-size:14px;line-height:1.15;
  flex:0 1 auto;
  min-width:18px;max-width:7.5rem;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  text-align:center;
}

Paired with the regression test at tests/test_kanban_ui_static.py:877-895 which asserts overflow:hidden, text-overflow:ellipsis, white-space:nowrap, max-width:7.5rem, and min-width:18px are all present in the compiled rule. That test will catch a regression if any of those properties get stripped during a future refactor of the kanban switcher styles.

Diagnosis / Recommendation

The shape is correct and matches the suggested fix range. One small note worth thinking about for follow-up rather than this PR: display:block on a flex child works but is slightly redundant — flex children render block-ish by default — and flex:0 1 auto with min-width:18px;max-width:7.5rem is what actually does the column sizing. If you wanted to tighten that, dropping display:block would be no-op visually. Not blocking; the rule as written is fine.

The flex-shrink change is the meaningful behavioral difference vs origin/master. On master, the icon column had flex-shrink:0;width:18px, so a long icon value would render the text centered around the 18-px column without overflowing-hiding — the visible characters bled into the name column. With flex:0 1 auto plus the new max-width and ellipsis, the column owns its content and clips at the boundary. That's the right tradeoff for sidebar menus where space is finite.

Worth verifying manually that nothing else relies on flex-shrink:0 for that icon — grep -rn "kanban-board-switcher-item-icon" static/ shows it's only set in one place (the renderer at panels.js:2489) and only styled here, so the radius is contained. Good.

Test plan

CI's already green on the rebased head per your comment. For local verification:

PYTHONPATH=$PWD pytest tests/test_kanban_ui_static.py::test_kanban_board_switcher_icon_column_clamps_long_labels -v

For visual verification, the two before/after PNGs under docs/images/pr-2458-board-selector-{before,after}.png cover the regression case. If a maintainer wants to reproduce live, the path is: create a board with icon set to a long string like "layout-kanban", open the board switcher menu, and confirm the icon column truncates with an ellipsis inside its own column rather than bleeding into the title.

This is a clean, scoped CSS fix with a passing regression test, screenshots, and a CHANGELOG entry. Ready to land on a maintainer review.

@franksong2702
franksong2702 force-pushed the franksong2702/fix-board-selector-menu-layout branch from 80bed76 to 9d6eb5f Compare May 18, 2026 08:08
@franksong2702

Copy link
Copy Markdown
Contributor Author

Rebased #2459 onto current origin/master (e6be01c4 / v0.51.89) and pushed the refreshed head:\n\n- PR head: 9d6eb5f0df\n- Local verification: /Users/xuefusong/hermes-webui/.venv/bin/python -m pytest tests/test_kanban_ui_static.py -q — 42 passed\n- Local hygiene: git diff --check origin/master...HEAD — passed\n- GitHub Actions on the refreshed head: test (3.11), test (3.12), and test (3.13) — passed\n\nThe PR is back to CLEAN and remains scoped to the board selector long-label overlap fix.

@nesquena-hermes nesquena-hermes closed this pull request by merging all changes into nesquena:master in 4589dbe May 18, 2026
Charanis pushed a commit to Charanis/hermes-webui-beyond that referenced this pull request May 18, 2026
eleboucher pushed a commit to eleboucher/homelab that referenced this pull request May 18, 2026
… 0.51.90) (#556)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [ghcr.io/nesquena/hermes-webui](https://github.com/nesquena/hermes-webui) | patch | `0.51.89` → `0.51.90` |

---

### Release Notes

<details>
<summary>nesquena/hermes-webui (ghcr.io/nesquena/hermes-webui)</summary>

### [`v0.51.90`](https://github.com/nesquena/hermes-webui/blob/HEAD/CHANGELOG.md#v05190--2026-05-18--Release-BN-stage-383--10-PR-full-sweep-batch--empty-gateway-messaging-history-fix--previous-messaging-sessions-setting--Kanban-board-switcher-layout--UIUX-demo-theme-controls--Slice-3c-queuegoal-RFC-gate--keyless-custom-endpoints--custom-provider-remote-model-catalog-parity--auto-compression-elapsed-timer--new-conversation-cold-start-guard--Kanban-drag-drop-detail-open-fix)

[Compare Source](nesquena/hermes-webui@v0.51.89...v0.51.90)

##### Fixed

- **PR [#&#8203;2286](nesquena/hermes-webui#2286 by [@&#8203;junjunjunbong](https://github.com/junjunjunbong) (refs [#&#8203;2275](nesquena/hermes-webui#2275)) — Narrow messaging stale-session filtering to active gateway sessions that are visible in the current sidebar candidate set. Older Discord/messaging history is now preserved when the gateway advertises a fresh zero-message session that hasn't yet entered the visible projection, instead of being hidden as stale. Adds a regression test for an empty active Discord gateway row preserving prior history.
- **PR [#&#8203;2459](nesquena/hermes-webui#2459 by [@&#8203;franksong2702](https://github.com/franksong2702) (closes [#&#8203;2458](nesquena/hermes-webui#2458)) — Fix the Kanban board switcher menu when a board's icon slot carries a long text label (e.g. `layout-kanban`). The icon column changed from a fixed `18px` slot to a bounded flex cell with `min-width:18px;max-width:7.5rem`, with overflow ellipsis on the icon itself so long labels render fully when space allows and truncate cleanly when not. Title and count columns keep stable spacing. Adds before/after screenshots and a CSS contract regression in `tests/test_kanban_ui_static.py`.
- **PR [#&#8203;2522](nesquena/hermes-webui#2522 by [@&#8203;Michaelyklam](https://github.com/Michaelyklam) (refs [#&#8203;2271](nesquena/hermes-webui#2271)) — Treat named custom OpenAI-compatible endpoints with a configured `base_url` as key-optional at WebUI agent startup. Local keyless servers (llama-server / vLLM-style LAN deployments) no longer fail early with a synthetic `CUSTOM:<slug>_API_KEY` env-var prompt before the request reaches the endpoint; instead the OpenAI-compatible client initialises with a harmless placeholder key and real configured keys are still preferred when present. Refactors the three near-identical custom-provider rebuild blocks (initial agent setup + two retry/healing paths) through the existing `resolve_custom_provider_connection` helper.
- **PR [#&#8203;2515](nesquena/hermes-webui#2515 by [@&#8203;Michaelyklam](https://github.com/Michaelyklam) (closes [#&#8203;2513](nesquena/hermes-webui#2513)) — Keep named custom-provider model pickers populated from each configured endpoint's live `/models` catalog even when `custom_providers[].model` is present. The singular `model` field now acts as a sticky/fallback entry appended *after* the remote catalog rather than collapsing the picker to just the configured model and hiding sibling named custom providers. Extracts reusable OpenAI-compatible `/models` parsing/fetching helpers and threads them through both the active-base-url and per-named-provider paths.
- **PR [#&#8203;2512](nesquena/hermes-webui#2512 by [@&#8203;dso2ng](https://github.com/dso2ng) (refs [#&#8203;2477](nesquena/hermes-webui#2477), Slice A) — Show an elapsed timer on the running automatic-compression card so long WebUI context-compression pauses no longer look frozen while the browser waits for the `compressed` event. Stamps `startedAt` on the `compressing` SSE event, ticks once per second, and switches to a `5+ min` cap label past the Slice A bound so the UI never frame-freezes at `05:00`. Browser-transient state only — no SSE contract change and no server-side resume reconstruction.
- **PR [#&#8203;2528](nesquena/hermes-webui#2528 by [@&#8203;Michaelyklam](https://github.com/Michaelyklam) (closes [#&#8203;2518](nesquena/hermes-webui#2518)) — Guard New Conversation creation while a previous `/api/session/new` request is still in flight, so cold model/provider catalog resolution gives immediate pending feedback and rapid repeated clicks reuse the same create request instead of enqueueing duplicate blank sessions. Coalesces concurrent `newSession()` calls behind a single in-flight promise, disables the sidebar button with `aria-busy="true"`, and shows a localized `Creating new conversation…` composer status.
- **PR [#&#8203;2530](nesquena/hermes-webui#2530 by [@&#8203;franksong2702](https://github.com/franksong2702) (refs [#&#8203;2529](nesquena/hermes-webui#2529)) — Keep Kanban drag/drop status updates from also opening the task detail pane. Two failure paths were both producing detail-pane opens after drag/drop: the browser's trailing synthetic click after `drop`, and the generic task-update helper opening detail on every PATCH. The fix adds a time-windowed `_kanbanSuppressCardClickUntil` set on `ondragstart`/`ondragend`/`ondrop` and routes drag/drop status changes through a board-only update path. Explicit card click and keyboard activation remain unchanged.

##### Added

- **PR [#&#8203;2294](nesquena/hermes-webui#2294 by [@&#8203;junjunjunbong](https://github.com/junjunjunbong) — Add a `show_previous_messaging_sessions` setting so users can opt back into seeing previous messaging sessions that were replaced by `session_reset` or auto-compression. The preference is wired through boot, settings persistence, and the sidebar projection. Also adds a separate "Hide from list" action for imported messaging/CLI sessions that hides individual rows from the sidebar without deleting source history.

##### Documentation

- **PR [#&#8203;2511](nesquena/hermes-webui#2511 by [@&#8203;franksong2702](https://github.com/franksong2702) (refs [#&#8203;2502](nesquena/hermes-webui#2502) / [#&#8203;2503](nesquena/hermes-webui#2503)) — Update the `docs/ui-ux/` demo appearance controls to initialize as `class="dark" data-skin="slate"` instead of the deprecated `data-theme`-only buttons and legacy theme names. Brings the demo pages in line with the live Theme + Skin contract referenced from the new `docs/CONTRACTS.md` so contributors following the contract-index path don't land on stale demos.
- **PR [#&#8203;2509](nesquena/hermes-webui#2509 by [@&#8203;Michaelyklam](https://github.com/Michaelyklam) (refs [#&#8203;1925](nesquena/hermes-webui#1925)) — Advance the runtime-adapter RFC after the Slice 3b approval/clarify seam shipped in v0.51.89. The RFC now marks Slice 3b as shipped and defines the next Slice 3c queue/continue + goal control gate: route those controls through `RuntimeAdapter.queue_message(...)` / `update_goal(...)` only after pinning stable response contracts, bounded unavailable-control behavior, replayable lifecycle/status evidence, ordering/idempotency expectations, and explicit non-goals for runner/sidecar ownership or a WebUI-owned queue/goal scheduler. Docs + adapter-seam regression test only — no runtime/control routing changes in this PR.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMDEuMSIsInVwZGF0ZWRJblZlciI6IjQzLjEwMS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL3BhdGNoIl19-->

Reviewed-on: https://git.erwanleboucher.dev/eleboucher/homelab/pulls/556
SysAdminDoc pushed a commit to SysAdminDoc/hermes-webui that referenced this pull request Jun 26, 2026
bernyforce pushed a commit to bernyforce/hermes-webui that referenced this pull request Jul 29, 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.

Board selector menu items overlap for long board keys

3 participants