fix(frontend): make the hackathon manage sidebar flat, not collapsible - #173
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The Manage section of
HackathonSidebarhad grown a fold: Manage Hackathonstayed on the rail and the rest of the organiser screens were disclosed from
a chevron beside it (
7605a04,df8e8e9). But an$effectforce-opens thefold the moment you're anywhere inside the section (
insideManage), andevery
/manage/*route counts as inside it — so navigating to any managescreen always rendered the full list anyway. That full list, inside a
sidebar with a fixed
md:h-[calc(100vh-3.5rem)], is taller than theviewport, and the fold bought nothing on the one set of pages an organiser
actually visits: it just forces
overflow-y-autoto kick in on every managescreen.
What changed
components/frontend/src/lib/components/layout/HackathonSidebar.svelteonly. Reverted the Manage section back to what it was before the fold: a
flat list of
manageNav's items, always fully rendered.manageOpen/insideManagestate, themanageHubItem/manageSubItemssplit,toggleManage, and the matchinglocalStorageread/write.
<SidebarNavSection>call for Manage now passesitems={manageItems}directly instead of
parentItem/open/onToggle.SidebarNavSection.svelteitself is untouched — it already renders aplain list when no
parentItemis passed, so no shared-component changeswere needed.
--consent-banner-hpadding and the nav'soverflow-y-autoalone: that's a real, separate fix for the session-replayconsent banner covering the last few sidebar entries, and it's the safety
net for genuinely short viewports.
HackathonSidebar.test.tsrewritten for the new (non-)behavior: everyManage 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 runonHackathonSidebar.test.ts+SidebarNavSection.test.ts— 24/24 pass.vitest run— same 5 files / 6 tests fail as on unmodifiedorigin/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./my/hackathon/<id>/manageas an owner and confirm the sidebar no longer needs to scroll for a normal item count.