Skip to content

feat(web): home & sidebar polish — activity indicators, notifications, borders, host labels#248

Open
mgabor3141 wants to merge 8 commits into
mainfrom
feat/local-host-multihost
Open

feat(web): home & sidebar polish — activity indicators, notifications, borders, host labels#248
mgabor3141 wants to merge 8 commits into
mainfrom
feat/local-host-multihost

Conversation

@mgabor3141
Copy link
Copy Markdown
Contributor

Summary

A batch of home/sidebar UI polish, building on the recently-merged dashboard work. Each concern is a separate commit; squash-merging is fine.

Changes

Sidebar

  • Bottom padding on the session list so the last row clears the viewport edge — the whitespace confirms you've actually reached the end.
  • Logo margins made consistent between desktop (top) and mobile (bottom) placement: symmetric 14px horizontal padding and matching vertical rhythm, with the safe-area inset moved to margin-bottom.
  • Inset inter-folder dividers: the repeating .folder + .folder lines are pulled in to the 14px content margin (via ::before) instead of spanning edge-to-edge, so the list reads as grouped rows rather than a hard grid. The header keeps its full-width border as a stronger zone boundary.

Activity indicators

  • Logo waiting dot: the sidebar wordmark now carries a waiting (unread) indicator, mirroring the mobile hamburger badge. Rendered to the right of "gmux" and aligned to the lowercase optical midline via vertical-align: middle (baseline + ½ x-height — no pixel nudging). Re-blinks when another session enters the waiting state.
  • Hamburger badge reduced to the waiting state only — working/active/error are no longer surfaced; dead CSS and unused imports removed.

Home

  • Enable-notifications moved into the Activity header, right-aligned as a low-priority ghost button (6px radius matching the rest of the app, center-aligned with the title). Denied state collapses to an icon-only muted bell with a tooltip.

Borders / hosts

  • Border token clarity: --border was only 22% lightness (barely above the near-black surface), so outlines and dividers read as faint. Raised to 32%, with --border-strong bumped to 38% to preserve the two-tier relationship.
  • Local host on multi-host setups: project headers (sidebar, home cards, project page title) now show the local host name too, but only when the shown folders span more than one host. All-local setups stay bare; degrades safely when the daemon hasn't reported a hostname.

Testing

  • 424 web tests pass (4 new for localHostLabel), lint + build clean.
  • Visually verified each change via mock mode + local install across desktop and mobile layouts.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 29, 2026

Try this PR

curl -sSfL https://gmux.app/install-pr.sh | sh -s -- 248

Built from 4a53371 — feat(web): show local host on project headers when projects span multiple hosts
Requires GitHub CLI with auth. Artifacts expire after 7 days.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 29, 2026

Greptile Summary

A UI polish batch for the home page and sidebar: activity indicators (waiting dot on the logo and simplified hamburger badge), notification prompt relocated into the Activity header, inset folder dividers, border token lightness bumped for readability, and local host labels shown only in multi-host setups. The previously-flagged HostSuffix peer-status collision risk is explicitly closed by the new local prop, and the empty-string sentinel is replaced with proper boolean tracking in localHostLabel.

  • Activity indicatorsuseArrivalPulse with unreadCount as the generation counter drives a waiting dot on the sidebar logo (desktop) and streamlines the hamburger badge (mobile) to waiting-state only, removing dead working/active/error CSS.
  • localHostLabel signal — counts distinct hosts via explicit hasLocal flag, returns the local hostname only when folders span more than one host, with four new tests covering the key scenarios.
  • CSS changes — border tokens raised from 22%/28% to 32%/38% lightness, mobile safe-area inset moved from padding-bottom to margin-bottom on .sidebar-header, and folder dividers pulled inward via ::before for a grouped-row appearance.

Confidence Score: 5/5

Safe to merge; all changes are additive UI polish with no data-path or auth implications.

The logic changes are narrow and well-guarded: localHostLabel only activates when multiple hosts are present, HostSuffix skips the peer-status map for local entries, and the activity-indicator simplification removes code paths rather than adding them. CSS changes affect visual presentation only.

No files require special attention.

Important Files Changed

Filename Overview
apps/gmux-web/src/store.ts Adds localHostLabel computed signal; correctly handles single-host, multi-host, no-hostname, and peer-only scenarios with explicit boolean tracking instead of the empty-string sentinel.
apps/gmux-web/src/store.test.ts Adds 4 tests for localHostLabel; the fourth test description is slightly misleading — it says 'all share one host' but only contains a single peer project rather than multiple projects sharing one peer.
apps/gmux-web/src/host-suffix.tsx Adds local prop to skip peer-status lookup for the local hostname, directly addressing the previously-flagged name-collision risk.
apps/gmux-web/src/sidebar.tsx Adds waiting-state indicator on the logo using useArrivalPulse with unreadCount as the generation counter; mirrors the hamburger badge logic cleanly.
apps/gmux-web/src/home.tsx Moves NotifPrompt into the Activity header as a right-aligned affordance; switches to compact icon-only denied state.
apps/gmux-web/src/main.tsx Simplifies hamburger badge to waiting-state only; removes unused backgroundActivity signal import and DotState type import.
apps/gmux-web/src/styles.css Raises border lightness tokens, adds sidebar waiting dot, insets folder dividers via ::before, moves notification prompt CSS, and switches mobile safe-area inset from padding-bottom to margin-bottom.
apps/gmux-web/src/project-hub.tsx Minimal change: passes localHostLabel to HostSuffix for multi-host project title labelling, with local={!projectPeer} guard.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    UC[unreadCount signal] --> WC{waitingCount > 0?}
    WC -- yes --> BG[bg-waiting class on logo/hamburger]
    WC -- yes --> AP[useArrivalPulse unread + generation]
    WC -- no --> NONE[no dot shown]
    AP -- fires --> ANIM[bg-arriving class]
    ANIM -- 560ms --> BG

    F[folders signal] --> LHL{hostCount > 1?}
    H[health.hostname] --> LHL
    LHL -- yes + hostname present --> LABEL[localHostLabel = hostname]
    LHL -- no OR no hostname --> UNDEF[localHostLabel = undefined]

    LABEL --> HS[HostSuffix local=true]
    UNDEF --> HSN[HostSuffix peer=undefined returns null]
    HS --> RENDER[render host badge always-connected]
Loading
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
apps/gmux-web/src/store.test.ts:586-592
The test description says "all share one host" which implies multiple peer projects all pointing at the same peer, but the setup only contains a single peer project (`peer: 'unraid'`). The description would more accurately read "only one distinct peer host, no local folders" — or, if the intent was to cover the multi-project same-peer scenario, a second peer project should be added.

```suggestion
  it('is undefined when the only distinct host is a remote peer (no local folders)', () => {
    _setRawWorld({
      health: { version: 'dev', hostname: 'workstation' },
      projects: [{ slug: 'b', peer: 'unraid' }],
    })
    expect(localHostLabel.value).toBeUndefined()
  })
```

Reviews (2): Last reviewed commit: "feat(web): show local host on project he..." | Re-trigger Greptile

Comment thread apps/gmux-web/src/store.ts Outdated
Comment thread apps/gmux-web/src/store.ts Outdated
@mgabor3141 mgabor3141 force-pushed the feat/local-host-multihost branch from fb13d69 to 4a53371 Compare May 29, 2026 22:56
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