Skip to content

fix(frontend): make the hackathon manage sidebar flat, not collapsible - #173

Merged
hanaCasey merged 4 commits into
developfrom
fix/manage-sidebar-non-collapsible
Aug 14, 2026
Merged

fix(frontend): make the hackathon manage sidebar flat, not collapsible#173
hanaCasey merged 4 commits into
developfrom
fix/manage-sidebar-non-collapsible

Conversation

@hanaCasey

Copy link
Copy Markdown
Contributor

Why

The Manage section of HackathonSidebar had grown a fold: Manage Hackathon
stayed on the rail and the rest of the organiser screens were disclosed from
a chevron beside it (7605a04, df8e8e9). But an $effect force-opens the
fold the moment you're anywhere inside the section (insideManage), and
every /manage/* route counts as inside it — so navigating to any manage
screen always rendered the full list anyway. That full list, inside a
sidebar with a fixed md:h-[calc(100vh-3.5rem)], is taller than the
viewport, and the fold bought nothing on the one set of pages an organiser
actually visits: it just forces overflow-y-auto to kick in on every manage
screen.

What changed

components/frontend/src/lib/components/layout/HackathonSidebar.svelte
only. Reverted the Manage section back to what it was before the fold: a
flat list of manageNav's items, always fully rendered.

  • Dropped manageOpen/insideManage state, the manageHubItem/
    manageSubItems split, toggleManage, and the matching localStorage
    read/write.
  • The <SidebarNavSection> call for Manage now passes items={manageItems}
    directly instead of parentItem/open/onToggle.
  • SidebarNavSection.svelte itself is untouched — it already renders a
    plain list when no parentItem is passed, so no shared-component changes
    were needed.
  • Left the unrelated --consent-banner-h padding and the nav's
    overflow-y-auto alone: that's a real, separate fix for the session-replay
    consent banner covering the last few sidebar entries, and it's the safety
    net for genuinely short viewports.

HackathonSidebar.test.ts rewritten for the new (non-)behavior: every
Manage entry renders on every page, there's no fold control, and a stale
assertion for "New Phase" (a manage-hub tile, never a sidebar entry) was
dropped from the "keeps every entry this branch has that main does not"
list — it already failed identically on unmodified develop.

Test plan

  • vitest run on HackathonSidebar.test.ts + SidebarNavSection.test.ts — 24/24 pass.
  • Full frontend vitest run — same 5 files / 6 tests fail as on unmodified origin/develop (confirmed by stashing this diff and re-running); no new failures introduced.
  • svelte-check — not run in this environment (tool timed out/was interrupted repeatedly); no type-level changes were made, only state/prop removal already exercised by the updated tests.
  • Reviewer: load /my/hackathon/<id>/manage as an owner and confirm the sidebar no longer needs to scroll for a normal item count.

The Manage section folded its screens under Manage Hackathon behind a
chevron, but the fold force-opened on every /manage/* route (entering
the section opens it) - so navigating to any manage screen always
rendered the full list anyway, inside a sidebar with a fixed
viewport-relative height, forcing it to scroll.

Revert to rendering manageNav's full item list flat, as before the
fold was introduced: drop manageOpen/insideManage state, the
hub/sub-item split, and the SidebarNavSection open/onToggle wiring.
SidebarNavSection itself is untouched and simply renders a plain list
when no parentItem is passed. The unrelated --consent-banner-h
padding and overflow-y-auto safety net on the nav are left in place.
Every PR into develop fails at the `format` stage before it reaches build or
test, and the cause is not in any PR's diff: develop has never had a green CI
run. The workflow only fires on pull_request and on pushes to main, so drift
that lands on develop is not seen until someone opens a PR from it — at which
point every branch cut from develop reports the same failure.

Three things were wrong, and they are separable:

1. treefmt reformats `.claude/**`, 103 files of self-contained agent tooling
   that carries its own conventions (2-space shell, hand-wrapped markdown, a
   pnpm-owned lockfile). Excluded here for the same reason the codegen dirs and
   components/frontend/pnpm-lock.yaml already are: a vendored tree belongs to
   its own generator, and formatting it only makes the two styles fight. This
   also removes all 19 shellcheck findings, every one of which was in there.

2. shellcheck runs with no severity floor (the repo passes only `-e SC1091`),
   so it fails the whole run on an *info*-level finding. The one left outside
   .claude is a false positive: backticks quoting a config key inside a
   deliberately single-quoted string. Suppressed at the line, with the reason.

3. The remaining 44 files are genuine drift — buf's canonical import/option
   order, golines wrapping, and prettier at 80 columns — and are simply the
   formatter's own output, applied with no hand edits.

`treefmt --ci` now exits 0 on this tree.

Claude-Session: https://claude.ai/code/session_01RLLSy37SvMnHE5MUcNy6G5
@hanaCasey
hanaCasey merged commit ffb350b into develop Aug 14, 2026
1 check passed
@hanaCasey
hanaCasey deleted the fix/manage-sidebar-non-collapsible branch August 14, 2026 10:25
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