Commit 3e5e573
authored
feat: per-package per-version changelog + /changelog page + auto-enforce on version bumps (#49)
* feat(changelog): per-package per-version changelog + backfill from git
Introduce a changelog/ directory at the repo root with one md file
per (package, version) tuple:
changelog/
README.md architecture + conventions
core/0.6.0.md one file per release
server/0.7.1.md
cli/0.7.0.md
ts-plugin/0.4.0.md
ui/0.2.0.md
…
The shape (per-package per-version, not per-commit) matches the way
we publish: every change of a packages/<pkg>/package.json version
field becomes a release entry. Each entry frontmatters package,
version, date, commit_count; the body groups qualifying commits
(feat / fix / breaking / perf) under Breaking / Features /
Performance / Fixes headings with PR links and commit SHAs.
scripts/backfill-changelog.js walks every packages/<pkg>/package.json
in git history, finds the commits that changed the version field,
and writes <pkg>/<version>.md for any (package, version) tuple that
does not yet have an entry. Existing files are left alone so
hand-curation survives re-runs.
Backfilled 43 files across the 5 packages from project inception
through 0.6.0 (core), 0.7.1 (server), 0.7.0 (cli), 0.4.0 (ts-plugin),
and 0.2.0 (ui).
* feat(website): /changelog page + Changelog nav link, responsive nav
Add website/app/changelog/page.ts that reads changelog/<pkg>/*.md
at SSR time, parses YAML-ish frontmatter and the minimal markdown
shape the backfill generator emits (h1, h2, bulleted lists, links,
inline code, bold), sorts entries by date desc, and renders one
card per release with a package-coloured badge, version, date, and
commit count.
Add the Changelog link to the layout nav. The header now uses
flex-wrap with gap-y-3 and the nav itself uses flex-wrap with
gap-x-3 sm:gap-x-4 + gap-y-2 so the now-six chrome elements
(Docs, UI, Changelog, Blog Demo, GitHub, theme-toggle) wrap into a
second row on narrow viewports instead of overflowing.
Verified locally: GET /changelog returns 200 with 156 KB of
rendered HTML containing every backfilled version across all five
packages.
* feat(changelog): auto-enforce changelog when a package version bumps
Add the "version bump triggers changelog" rule to the framework
AGENTS.md and back it with two gates:
1. .hooks/pre-commit refuses any commit whose staged diff bumps a
packages/<pkg>/package.json version field without a matching
changelog/<pkg>/<version>.md file. Prints the exact command the
author needs (node scripts/backfill-changelog.js && git add
changelog/).
2. .claude/hooks/changelog-nudge.sh is a PreToolUse hook that fires
on Bash tool calls whose command matches git commit. It runs the
same check and emits a permissionDecision: deny JSON payload, so
Claude Code refuses the commit before it leaves the agent's
shell. Wired into .claude/settings.json.
Both hooks are bypassable with --no-verify for emergencies. The AI
agent rule in AGENTS.md instructs agents to run the generator in
the same commit as the version bump, review the generated file,
and edit it in place for clarity before pushing.
* fix(hooks): correct off-by-one in awk slice that picked up trailing slash in pkg name
* feat(website): mobile hamburger menu using native <details>/<summary>
The previous flex-wrap nav let the items wrap below the logo on
narrow viewports, but on iPhone XR (414px) the 5 links + theme
toggle still felt congested. Replace it with a real mobile menu.
Below md (768px): the logo, theme-toggle, and a hamburger button
sit on one row; the hamburger is a native <details>/<summary> that
pops the same 5 links into a dropdown panel. At md and up: hide the
mobile cluster, show the inline nav as before. CSS strips the
default disclosure triangle and swaps the hamburger / close icons
via .mobile-menu[open].
Progressive enhancement: native <details> works without JS, so the
menu opens / closes on every viewport even when scripts have not
yet hydrated.
* fix(website): close mobile menu when a link inside it is clicked
Native <details> stays open on inner-anchor activation, so tapping
Changelog (or any other link) on mobile kept the panel visible.
Add a delegated click listener that strips the open attribute from
the parent <details> when any link inside .mobile-menu is activated.
Covers both regular target=_blank links and the same-origin client-
router-intercepted ones.
* feat(website,blog,ui): unify mobile-menu pattern across the three apps
webjs.dev, example-blog, and ui.webjs.dev now share the same mobile
header layout: hamburger LEFT, theme-toggle RIGHT, with a native
<details>/<summary> dropdown panel anchored to the hamburger.
- webjs website: swap the order so the hamburger sits LEFT of the
theme-toggle (was the reverse).
- example blog: drop the old fixed-drawer + body[data-menu-open]
pattern in favour of the dropdown. Removes ~30 lines of CSS and
matches the rest of the chrome surfaces. The mobile cluster is
sm:hidden because the blog's existing inline nav is sm:flex.
- ui.webjs.dev: introduce the same dropdown pattern from scratch.
The "Webjs" cross-link, previously hidden on small screens via
hidden sm:inline, now lives in the dropdown panel where it's
reachable on phones.
Docs site keeps its existing left-rail-drawer pattern (intentionally
untouched, since the docs UI needs a full sidebar, not a dropdown).
Same delegated click handler in every layout: any anchor activation
inside .mobile-menu strips the open attribute on the parent
<details>, so the panel auto-closes on navigation.
* fix(website,blog,ui): close mobile menu on outside click too
Tapping outside the open dropdown should dismiss it on a phone;
previously only the close icon (the toggled summary) closed it,
which felt off because the user has nothing visually grabbing
their attention to that one tap target.
Extend the existing delegated click handler in all three layouts
to walk `.mobile-menu[open]` and strip the open attribute on any
that don't contain the click target. The link-click branch is
unchanged: links inside the panel still close the panel directly.
Docs site keeps its own drawer pattern; this change does not touch
it.1 parent 25452ab commit 3e5e573
53 files changed
Lines changed: 1930 additions & 67 deletions
File tree
- .claude
- hooks
- .hooks
- changelog
- cli
- core
- server
- ts-plugin
- ui
- examples/blog/app
- packages/ui/packages/website/app
- scripts
- website/app
- changelog
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
12 | 21 | | |
13 | 22 | | |
14 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
35 | 72 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
100 | 113 | | |
101 | 114 | | |
102 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
0 commit comments