Skip to content

feat: add boundaries gallery demo + harden scaffold-sync skill (#848 follow-up)#854

Merged
vivek7405 merged 2 commits into
mainfrom
chore/harden-scaffold-sync-848
Jul 8, 2026
Merged

feat: add boundaries gallery demo + harden scaffold-sync skill (#848 follow-up)#854
vivek7405 merged 2 commits into
mainfrom
chore/harden-scaffold-sync-848

Conversation

@vivek7405

Copy link
Copy Markdown
Collaborator

Why

Follow-up to the Next.js 16 file-routing parity work (#848). That PR added forbidden()/unauthorized(), global-error/global-not-found, and nearest-wins not-found, and it updated the scaffold rule files (AGENTS.md/CONVENTIONS.md app-tree bullets) plus the await params gallery demo. But it shipped no gallery demo for the new control-flow throws. The gallery is webjs's primary teaching surface for AI agents, so an undemoed thrower is effectively invisible to an agent scaffolding an app.

The scaffold-sync hook floor passed (the PR did stage scaffold surfaces), so nothing flagged the miss. Root cause: the webjs-scaffold-sync skill had no change-type row for a new control-flow throw / routing boundary file.

What

  1. Harden the skill. New change-type row in webjs-scaffold-sync requiring a runnable gallery demo (a route that throws + its nearest boundary file) for any new control-flow throw or boundary file, not just an app-tree bullet. Notes the root-only carve-out.
  2. Fill the gap. New app/features/boundaries gallery demo (full-stack + saas):
    • index page teaching notFound/redirect/forbidden/unauthorized + the boundary files;
    • gated/ throws forbidden(), caught by the nearest forbidden.ts (403);
    • private/ throws unauthorized(), caught by the nearest unauthorized.ts (401);
    • root-only global-error/global-not-found taught in prose (cannot mount under a feature folder).
      Cross-linked from the routing demo; added to the home features array, the rule-file feature lists, and scaffold-gallery.test.js.

Verification

  • Generated a full-stack app, booted it: /features/boundaries → 200, /features/boundaries/gated403 (nearest forbidden.ts), /features/boundaries/private401 (nearest unauthorized.ts).
  • webjs check: only the expected no-scaffold-placeholder markers, no other violations.
  • scaffold-gallery.test.js: 8/8.
  • Regression sweep for Close Next.js 16 file-routing parity gaps (async params, forbidden/unauthorized, global-error/not-found, instrumentation) #848 (per the concern about actions/HTTP-verbs/async-render): 59 tests green across await-params, thenable-params, forbidden-unauthorized, page-action, action-verbs, action-config, actions, seed-ssr, action-roundtrip, and async-render SSR. No regressions.

Definition of done

  • Tests: added (scaffold-gallery asserts) + regression sweep. Updated.
  • Docs: scaffold AGENTS.md + CONVENTIONS.md feature lists. Updated.
  • Scaffold: the point of this PR. Updated + generate-boot-check verified.
  • Skill: webjs-scaffold-sync hardened.

vivek7405 added 2 commits July 9, 2026 00:33
The #848 file-routing parity work documented forbidden()/unauthorized()
and the global-error/global-not-found boundaries in the scaffold rule
files but shipped no gallery demo for them, only the await-params demo.
The gallery is the primary teaching surface, so an undemoed thrower is
invisible to a scaffolding agent. Add a change-type row so a new
control-flow throw or routing boundary file requires a runnable gallery
demo, not just an app-tree bullet, and note the root-only carve-out.
…files)

Close the scaffold teaching gap from #848. The full-stack and saas
scaffolds now ship an app/features/boundaries demo: an index page
teaching the four control-flow throws (notFound/redirect/forbidden/
unauthorized) and their boundary files, plus two live sub-routes,
gated/ (throws forbidden(), caught by the nearest forbidden.ts at 403)
and private/ (throws unauthorized(), caught by the nearest
unauthorized.ts at 401). Root-only global-error/global-not-found are
taught in prose since they cannot mount under a feature folder.

Wired into the home features array (full-stack + saas), cross-linked
from the routing demo, added to the scaffold rule-file feature lists,
and asserted in scaffold-gallery.test.js. Verified by generating a
full-stack app, booting it, and confirming /features/boundaries/gated
renders 403 and /private renders 401.
@vivek7405 vivek7405 marked this pull request as ready for review July 8, 2026 19:41
@vivek7405 vivek7405 merged commit 5f7bd1f into main Jul 8, 2026
9 of 10 checks passed
@vivek7405 vivek7405 deleted the chore/harden-scaffold-sync-848 branch July 8, 2026 19:41
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