geneseed 4.9.4 → 4.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +13 -0
  3. package/SHIPPED.md +1 -1
  4. package/docs/README.md +1 -1
  5. package/docs/concepts/collaboration.md +1 -1
  6. package/docs/concepts/enforcement-table.md +1 -1
  7. package/docs/concepts/foreman-mode.md +1 -1
  8. package/docs/concepts/kits.md +79 -0
  9. package/docs/concepts/loop-branch.md +1 -1
  10. package/docs/concepts/loop-bricks.md +1 -1
  11. package/docs/concepts/loop-contracts.md +1 -1
  12. package/docs/concepts/loop-gates.md +1 -1
  13. package/docs/concepts/loop-notes.md +1 -1
  14. package/docs/concepts/loop-risk.md +1 -1
  15. package/docs/concepts/loop-templates.md +1 -1
  16. package/docs/concepts/loops.md +1 -1
  17. package/docs/concepts/lsp.md +1 -1
  18. package/docs/extending.md +108 -4
  19. package/docs/guides/install-scripted.md +1 -1
  20. package/docs/reference/glossary.md +1 -0
  21. package/docs/web-ui.md +4 -0
  22. package/harness.config.json +1 -1
  23. package/js/build/args.mjs +27 -6
  24. package/js/build/driver.mjs +29 -8
  25. package/js/build/emit-claude.mjs +3 -1
  26. package/js/build/generate.mjs +10 -5
  27. package/js/build/render.mjs +94 -11
  28. package/js/build/source.mjs +117 -4
  29. package/js/cli-table.json +15 -0
  30. package/js/hosts/installs.mjs +35 -2
  31. package/js/hosts/native.mjs +14 -4
  32. package/js/inspect/checks-authoring.mjs +6 -3
  33. package/js/inspect/checks-build.mjs +7 -1
  34. package/js/inspect/checks-counts.mjs +153 -6
  35. package/js/inspect/checks-repo.mjs +95 -20
  36. package/js/inspect/diff.mjs +3 -1
  37. package/js/inspect/inventory.mjs +1 -0
  38. package/js/inspect/status.mjs +44 -3
  39. package/js/inspect/validate.mjs +3 -3
  40. package/js/maintain/setup.mjs +30 -6
  41. package/js/maintain/update.mjs +1 -1
  42. package/js/web/actions.mjs +30 -6
  43. package/js/web/api.mjs +40 -3
  44. package/js/web/routes.mjs +2 -1
  45. package/package.json +1 -1
  46. package/registry.json +63 -0
  47. package/src/AGENT.md.tmpl +2 -2
  48. package/src/agents/devops-engineer.md +45 -0
  49. package/src/agents/docker-expert.md +45 -0
  50. package/src/agents/kubernetes-specialist.md +45 -0
  51. package/src/agents/reviewer.md +2 -0
  52. package/src/agents/spring-boot-engineer.md +48 -0
  53. package/src/agents/spring-reviewer.md +49 -0
  54. package/src/agents/spring-security.md +50 -0
  55. package/src/kits/spring-boot/rules.md +10 -0
  56. package/src/kits/spring-boot.json +23 -0
  57. package/src/licenses/mattpocock-skills.txt +21 -0
  58. package/src/licenses/piomin-spring-boot.txt +190 -0
  59. package/src/licenses/superpowers.txt +21 -0
  60. package/src/licenses/vibe-wise.txt +21 -0
  61. package/src/skills/brainstorm/builder-check.md +2 -0
  62. package/src/skills/brainstorm.md +4 -0
  63. package/src/skills/codebase-design.md +4 -0
  64. package/src/skills/daydream/VENDOR.md +7 -7
  65. package/src/skills/debug.md +5 -1
  66. package/src/skills/develop.md +2 -0
  67. package/src/skills/geneseed-code-review.md +6 -2
  68. package/src/skills/git-history.md +2 -0
  69. package/src/skills/handoff.md +2 -0
  70. package/src/skills/learn-mode.md +3 -2
  71. package/src/skills/parallel-agents.md +2 -0
  72. package/src/skills/pipeline.md +2 -0
  73. package/src/skills/plan.md +4 -0
  74. package/src/skills/prototype.md +2 -0
  75. package/src/skills/react-view-transitions/AGENTS.md +646 -221
  76. package/src/skills/react-view-transitions/SKILL.md +28 -16
  77. package/src/skills/react-view-transitions/VENDOR.md +10 -8
  78. package/src/skills/react-view-transitions/references/css-recipes.md +72 -2
  79. package/src/skills/react-view-transitions/references/implementation.md +14 -26
  80. package/src/skills/react-view-transitions/references/nextjs.md +94 -37
  81. package/src/skills/react-view-transitions/references/patterns.md +60 -48
  82. package/src/skills/react-view-transitions/references/troubleshooting.md +47 -0
  83. package/src/skills/research.md +2 -0
  84. package/src/skills/review-response.md +2 -0
  85. package/src/skills/rule.md +2 -0
  86. package/src/skills/ship.md +2 -0
  87. package/src/skills/skill-forge.md +1 -0
  88. package/src/skills/spring-boot/cloud.md +103 -0
  89. package/src/skills/spring-boot/java-modern.md +71 -0
  90. package/src/skills/spring-boot/logging.md +89 -0
  91. package/src/skills/spring-boot/security.md +112 -0
  92. package/src/skills/spring-boot/web.md +112 -0
  93. package/src/skills/spring-boot.md +57 -0
  94. package/src/skills/spring-data-jpa/patterns.md +68 -0
  95. package/src/skills/spring-data-jpa.md +81 -0
  96. package/src/skills/spring-testing.md +93 -0
  97. package/src/skills/wayfinder.md +2 -0
  98. package/src/upstreams.json +59 -0
  99. package/themes/_TEMPLATE.json +9 -0
  100. package/themes/biker.json +9 -0
  101. package/themes/commentator.json +9 -0
  102. package/themes/cyberpunk.json +9 -0
  103. package/themes/gamer.json +9 -0
  104. package/themes/imperial.json +9 -0
  105. package/themes/joker.json +9 -0
  106. package/themes/marvin.json +9 -0
  107. package/themes/mean.json +9 -0
  108. package/themes/military.json +9 -0
  109. package/themes/neutral.json +9 -0
  110. package/themes/pirate.json +9 -0
  111. package/themes/sports.json +9 -0
  112. package/themes/verstappen.json +9 -0
  113. package/themes/wizard.json +9 -0
  114. package/web/dist/assets/{Activity-C8sZVIUU.js → Activity-BjyJaf8e.js} +1 -1
  115. package/web/dist/assets/{ActivityDetail-Cc6vWUS4.js → ActivityDetail-Bo9nRDNV.js} +1 -1
  116. package/web/dist/assets/{Dashboard-C5ATa3ow.js → Dashboard-BQJGU7vE.js} +2 -2
  117. package/web/dist/assets/{Docs-tDW7i7mo.js → Docs-DLVckkew.js} +1 -1
  118. package/web/dist/assets/{GreenhouseView-zk2Uzc3A.js → GreenhouseView--DML7CW3.js} +1 -1
  119. package/web/dist/assets/{Installs-CB_rvbBP.js → Installs-CxCiln1F.js} +2 -2
  120. package/web/dist/assets/{JournalView-Bfj27XHC.js → JournalView-ymgZleHi.js} +1 -1
  121. package/web/dist/assets/{Laws-BA3CzUf5.js → Laws-BkKnZOBI.js} +1 -1
  122. package/web/dist/assets/Library-C8ercIZv.js +1 -0
  123. package/web/dist/assets/{Loops-DaPk-ckL.js → Loops-C95zhbFl.js} +1 -1
  124. package/web/dist/assets/{OperatorHudView-CyiGhiHk.js → OperatorHudView-B9qwc3w3.js} +1 -1
  125. package/web/dist/assets/{Personal-Bwd27CmT.js → Personal-DyR72AF-.js} +1 -1
  126. package/web/dist/assets/{Tabs-BOD7Kaz1.js → Tabs-ChCr_HqV.js} +1 -1
  127. package/web/dist/assets/api-BfpZmUMI.js +1 -0
  128. package/web/dist/assets/{drawable-CyLe1gtW.js → drawable-CgYi0Dtg.js} +1 -1
  129. package/web/dist/assets/index-B32EvfDT.js +2 -0
  130. package/web/dist/index.html +2 -2
  131. package/web/dist/assets/Library-BWwiy9Vb.js +0 -1
  132. package/web/dist/assets/api-CiXlkbe0.js +0 -1
  133. package/web/dist/assets/index-DQXG_mqo.js +0 -2
@@ -24,7 +24,7 @@ Implement **all** applicable patterns from this list, in this order:
24
24
  | 2 | **Suspense reveal** | "Data loaded" |
25
25
  | 3 | **List identity** (per-item `key`) | "Same items, new arrangement" |
26
26
  | 4 | **State change** (`enter`/`exit`) | "Something appeared/disappeared" |
27
- | 5 | **Route change** (layout-level) | "Going to a new place" |
27
+ | 5 | **Route change** (page-level) | "Going to a new place" |
28
28
 
29
29
  This is an implementation order, not a "pick one" list. Implement every pattern that fits the app. Only skip a pattern if the app has no use case for it.
30
30
 
@@ -45,13 +45,13 @@ Reserve directional slides for hierarchical navigation (list → detail) and ord
45
45
 
46
46
  - **Next.js:** Do **not** install `react@canary` — the App Router already bundles React canary internally. `ViewTransition` works out of the box. `npm ls react` may show a stable-looking version; this is expected.
47
47
  - **Without Next.js:** Install `react@canary react-dom@canary` (`ViewTransition` is not in stable React).
48
- - Browser support: Chromium 111+, Firefox 144+, Safari 18.2+. Graceful degradation on unsupported browsers.
48
+ - Browser support: Chromium 125+ (React needs the v2 object form of `startViewTransition`), Firefox 144+, Safari 18.2+. Graceful degradation on unsupported browsers.
49
49
 
50
50
  ---
51
51
 
52
52
  ## Implementation Workflow
53
53
 
54
- When adding view transitions to an existing app, **follow `references/implementation.md` step by step.** Start with the audit — do not skip it. Copy the CSS recipes from `references/css-recipes.md` into the global stylesheet — do not write your own animation CSS.
54
+ When adding view transitions to an existing app, **follow [references/implementation.md](references/implementation.md) step by step.** Start with the audit — do not skip it. Use [references/css-recipes.md](references/css-recipes.md) for the applicable CSS and adapt it to the app.
55
55
 
56
56
  ---
57
57
 
@@ -75,7 +75,7 @@ React auto-assigns a unique `view-transition-name` and calls `document.startView
75
75
  |---------|--------------|
76
76
  | **enter** | `<ViewTransition>` first inserted during a Transition |
77
77
  | **exit** | `<ViewTransition>` first removed during a Transition |
78
- | **update** | DOM mutations inside a `<ViewTransition>`. With nested VTs, mutation applies to the innermost one |
78
+ | **update** | DOM mutations inside a `<ViewTransition>`, or the boundary itself changing size/position due to an immediate sibling. With nested VTs, mutation applies to the innermost one |
79
79
  | **share** | Named VT unmounts and another with same `name` mounts in the same Transition |
80
80
 
81
81
  Only `startTransition`, `useDeferredValue`, or `Suspense` activate VTs. Regular `setState` does not animate.
@@ -119,7 +119,7 @@ If `default` is `"none"`, all triggers are off unless explicitly listed.
119
119
  - `::view-transition-group(.class)` — container
120
120
  - `::view-transition-image-pair(.class)` — old + new pair
121
121
 
122
- See `references/css-recipes.md` for ready-to-use animation recipes.
122
+ See [references/css-recipes.md](references/css-recipes.md) for ready-to-use animation recipes.
123
123
 
124
124
  ---
125
125
 
@@ -178,12 +178,16 @@ export function DirectionalTransition({ children }: { children: React.ReactNode
178
178
 
179
179
  ### `router.back()` and Browser Back Button
180
180
 
181
- `router.back()` and the browser's back/forward buttons do **not** trigger view transitions (`popstate` is synchronous, incompatible with `startViewTransition`). Use `router.push()` with an explicit URL instead.
181
+ `router.back()` and the browser's back/forward buttons carry **no transition types**, so type-keyed animations (directional slides) resolve to their `default` and don't play — untyped shared-element morphs still apply. For typed animations, use `router.push()` with an explicit URL.
182
182
 
183
183
  ### Types and Suspense
184
184
 
185
185
  Types are available during navigation but **not** during subsequent Suspense reveals (separate transitions, no type). Use type maps for page-level enter/exit; use simple string props for Suspense reveals.
186
186
 
187
+ ### Shared Element Readiness
188
+
189
+ A shared element transition can pair elements only when both the old and new views are rendered in the same Transition. If incoming content suspends, only its fallback exists for that update; the resolved content appears in a later Suspense transition and can be animated separately.
190
+
187
191
  ---
188
192
 
189
193
  ## Shared Element Transitions
@@ -203,6 +207,7 @@ Same `name` on two VTs — one unmounting, one mounting — creates a shared ele
203
207
 
204
208
  - Only one VT with a given `name` can be mounted at a time — use unique names (`photo-${id}`). Watch for reusable components: if a component with a named VT is rendered in both a modal/popover *and* a page, both mount simultaneously and break the morph. Either make the name conditional (via a prop) or move the named VT out of the shared component into the specific consumer.
205
209
  - `share` takes precedence over `enter`/`exit`. Think through each navigation path: when no matching pair forms (e.g., the target page doesn't have the same name), `enter`/`exit` fires instead. Consider whether the element needs a fallback animation for those paths.
210
+ - Two ways a wired-up morph silently never fires: (1) `default="none"` with no explicit `share` prop — share resolves to none; (2) type-keyed `share` where the navigation never adds the type — a plain link click resolves the map's `default`. Every link that should morph must add the type (`transitionTypes` on `next/link`, or `addTransitionType`).
206
211
  - Never use a fade-out exit on pages with shared morphs — use a directional slide instead.
207
212
 
208
213
  ---
@@ -227,6 +232,10 @@ Same `name` on two VTs — one unmounting, one mounting — creates a shared ele
227
232
 
228
233
  Trigger inside `startTransition`. Avoid wrapper `<div>`s between list and VT.
229
234
 
235
+ ### Layout Displacement Morph
236
+
237
+ Only content inside an activated boundary animates position — everything else teleports to its new layout spot. Wrap the sibling content below a growing/shrinking list in a bare `<ViewTransition>` so it glides instead of jumping. See [Layout Displacement Morph](references/patterns.md#layout-displacement-morph).
238
+
230
239
  ### Composing Shared Elements with List Identity
231
240
 
232
241
  Shared elements and list identity are independent concerns — don't confuse one for the other. When a list item contains a shared element (e.g., an image that morphs into a detail view), use two nested `<ViewTransition>` boundaries:
@@ -272,7 +281,7 @@ Directional reveal:
272
281
  </Suspense>
273
282
  ```
274
283
 
275
- For more patterns, see `references/patterns.md`.
284
+ For more patterns, see [references/patterns.md](references/patterns.md).
276
285
 
277
286
  ---
278
287
 
@@ -280,9 +289,11 @@ For more patterns, see `references/patterns.md`.
280
289
 
281
290
  Every VT matching the trigger fires simultaneously in a single `document.startViewTransition`. VTs in **different** transitions (navigation vs later Suspense resolve) don't compete.
282
291
 
283
- ### Use `default="none"` Liberally
292
+ ### Use `default="none"` Deliberately
293
+
294
+ Without it, every VT fires the browser cross-fade on **every** transition — Suspense resolves, `useDeferredValue` updates, background revalidations. Use `default="none"` on named/shared elements and type-keyed page VTs.
284
295
 
285
- Without it, every VT fires the browser cross-fade on **every** transition — Suspense resolves, `useDeferredValue` updates, background revalidations. Always use `default="none"` and explicitly enable only desired triggers.
296
+ But it also turns off `update` (layout/reflow morphs) and `share` (a named pair with no explicit `share` prop never morphs). Keyed list items and displaced siblings *want* update — leave them bare or set `update="auto"`.
286
297
 
287
298
  ### Two Patterns Coexist
288
299
 
@@ -293,28 +304,29 @@ They coexist because they fire at different moments. `default="none"` on both pr
293
304
 
294
305
  ### Nested VT Limitation
295
306
 
296
- When a parent VT exits, nested VTs inside it do **not** fire their own enter/exit — only the outermost VT animates. Per-item staggered animations during page navigation are not possible today. See [react#36135](https://github.com/facebook/react/pull/36135) for an experimental opt-in fix.
307
+ When a parent VT mounts/unmounts **as one unit** with nested VTs inside it, the nested ones do not fire their own enter/exit — only the outermost VT animates. (A child VT mounted inside a *persistent* parent VT fires enter/exit normally.) Per-item staggered animations during page navigation are not currently available in Next.js; see [troubleshooting](references/troubleshooting.md) for the upstream experimental status.
297
308
 
298
309
  ---
299
310
 
300
311
  ## Next.js Integration
301
312
 
302
- For Next.js setup (`experimental.viewTransition` flag, `transitionTypes` prop on `next/link`, App Router patterns, Server Components), see `references/nextjs.md`.
313
+ For Next.js integration (`transitionTypes` on `next/link` and `useRouter`, App Router patterns, Server Components), see [references/nextjs.md](references/nextjs.md).
303
314
 
304
315
  ---
305
316
 
306
317
  ## Accessibility
307
318
 
308
- Always add the reduced motion CSS from `references/css-recipes.md` to your global stylesheet.
319
+ Always add the reduced motion CSS from [references/css-recipes.md](references/css-recipes.md#reduced-motion) to your global stylesheet.
309
320
 
310
321
  ---
311
322
 
312
323
  ## Reference Files
313
324
 
314
- - **`references/implementation.md`** — Step-by-step implementation workflow.
315
- - **`references/patterns.md`** — Patterns, animation timing, events API, troubleshooting.
316
- - **`references/css-recipes.md`** — Ready-to-use CSS animation recipes.
317
- - **`references/nextjs.md`** — Next.js App Router patterns and Server Component details.
325
+ - **[references/implementation.md](references/implementation.md)** — Step-by-step implementation workflow.
326
+ - **[references/patterns.md](references/patterns.md)** — Patterns, animation timing, and events API.
327
+ - **[references/troubleshooting.md](references/troubleshooting.md)** — Symptom-driven debugging and runtime limitations.
328
+ - **[references/css-recipes.md](references/css-recipes.md)** — Ready-to-use CSS animation recipes.
329
+ - **[references/nextjs.md](references/nextjs.md)** — Next.js App Router patterns and Server Component details.
318
330
 
319
331
  ## Full Compiled Document
320
332
 
@@ -1,21 +1,23 @@
1
1
  # Vendored skill — react-view-transitions
2
2
 
3
- This folder is a third-party skill vendored **verbatim** (two lines aside, below) into Geneseed, not a
3
+ This folder is a third-party skill vendored **verbatim** (the frontmatter lines below aside) into Geneseed, not a
4
4
  Geneseed-authored skill. It rides along in the rendered bundle and is exempt from
5
5
  Geneseed's authoring gates (token, dead-link, hermeticity, skill counts) — it is
6
6
  listed in the generator's `VENDORED_SKILL_DIRS`.
7
7
 
8
- - **Upstream:** https://github.com/vercel-labs/agent-skills/tree/main/skills/react-view-transitions
9
- - **Commit:** f8a72b9603728bb92a217a879b7e62e43ad76c81
10
- - **Author:** Vercel Engineering
11
- - **License:** MIT (https://github.com/vercel-labs/agent-skills — `## License` → MIT).
12
- Upstream ships no LICENSE file (neither at the pinned commit nor on `main`), so there
13
- is no license text to carry here; the README's declaration is the whole grant.
8
+ - **Upstream key:** react-view-transitions (repo, pinned commit, author and licence:
9
+ `src/upstreams.json`)
10
+ - **Credit:** {{CREDIT:react-view-transitions:skills/react-view-transitions}}
11
+
12
+ The licence is MIT, declared in the upstream repo README's `## License`. Upstream ships no LICENSE
13
+ file (neither at the pinned commit nor on `main`; re-checked at 063bee94), so there is no license text to carry here
14
+ and the entry's `licenseFile` is null; the README's declaration is the whole grant.
14
15
 
15
16
  The skill follows the [Agent Skills](https://agentskills.io/) format (`SKILL.md` +
16
17
  `references/`). Its internal links point at the upstream project's own files; do not
17
18
  "fix" them to Geneseed paths — that is why the folder is gate-exempt. To update,
18
- re-copy the upstream folder, re-apply the two deviations below, and bump the commit above.
19
+ re-copy the upstream folder (new or removed files included, e.g. `references/troubleshooting.md`), re-apply the deviations below, and bump the entry's `commit`
20
+ in `src/upstreams.json`.
19
21
 
20
22
  **Deviation 1:** upstream's frontmatter says `name: vercel-react-view-transitions`;
21
23
  here it is `name: react-view-transitions`. The Agent Skills format requires the name to
@@ -2,6 +2,8 @@
2
2
 
3
3
  Ready-to-use CSS for `<ViewTransition>` props. Copy into your global stylesheet.
4
4
 
5
+ This file contains the complete CSS recipe set for the patterns in this skill. Copy only what the app needs.
6
+
5
7
  ---
6
8
 
7
9
  ## Timing Variables
@@ -18,8 +20,8 @@ Ready-to-use CSS for `<ViewTransition>` props. Copy into your global stylesheet.
18
20
 
19
21
  ```css
20
22
  @keyframes fade {
21
- from { filter: blur(3px); opacity: 0; }
22
- to { filter: blur(0); opacity: 1; }
23
+ from { opacity: 0; }
24
+ to { opacity: 1; }
23
25
  }
24
26
 
25
27
  @keyframes slide {
@@ -48,6 +50,8 @@ Ready-to-use CSS for `<ViewTransition>` props. Copy into your global stylesheet.
48
50
 
49
51
  Usage: `<ViewTransition enter="fade-in" exit="fade-out" />`
50
52
 
53
+ Keep the shared fade keyframe opacity-only. If a specific morph needs softness, give that class its own blur keyframe so ordinary content reveals stay crisp.
54
+
51
55
  ---
52
56
 
53
57
  ## Slide (Vertical)
@@ -204,6 +208,39 @@ Usage: `<ViewTransition enter="scale-in" exit="scale-out" />`
204
208
 
205
209
  ---
206
210
 
211
+ ## Interactivity During Transitions
212
+
213
+ The `::view-transition` overlay captures all pointer events. React shrinks it to zero when the root group doesn't animate, but in-flight animations still block clicks. To pass clicks/hover through even while animating:
214
+
215
+ ```css
216
+ ::view-transition {
217
+ pointer-events: none;
218
+ }
219
+ ```
220
+
221
+ Trade-offs: clicks can hit live elements under still-moving snapshots, and it only helps **unnamed** content — named participants are skipped by hit-testing for the transition's duration, no CSS override ([csswg#10930](https://github.com/w3c/csswg-drafts/issues/10930)). Weigh that before naming interactive elements; portal named popovers (see [Isolate Elements from Parent Animations](patterns.md#isolate-elements-from-parent-animations)).
222
+
223
+ ---
224
+
225
+ ## No Root Cross-Fade (Live Root)
226
+
227
+ The root cross-fades on every transition, freezing unnamed content behind a stale snapshot — hover and active styles stop rendering until it settles. `::view-transition-new(root)` is a **live** capture, so disabling the root animation keeps unnamed regions rendering (and, with the `pointer-events` recipe above, interactive):
228
+
229
+ ```css
230
+ ::view-transition-old(root) {
231
+ display: none;
232
+ }
233
+ ::view-transition-new(root) {
234
+ animation: none;
235
+ }
236
+ ```
237
+
238
+ Named and classed groups still animate — they stack above root. Trade-off: unnamed content swaps instantly, so regions that should fade need their own VT. This also removes the main reason to hand-name static chrome; keep names only for elements that must stack above animating groups.
239
+
240
+ Pairs well with enter-only reveals: skip the fallback-exit VT entirely (`<ViewTransition enter="auto" default="none">` around the content, nothing on the skeleton) — the skeleton snaps out live while the content fades in.
241
+
242
+ ---
243
+
207
244
  ## Persistent Element Isolation
208
245
 
209
246
  ```css
@@ -213,6 +250,8 @@ Usage: `<ViewTransition enter="scale-in" exit="scale-out" />`
213
250
  }
214
251
  ```
215
252
 
253
+ Layer multiple pinned groups with z-index tiers — chrome at `100`, toasts/overlays that must beat everything at `200`.
254
+
216
255
  ### Backdrop-Blur Workaround
217
256
 
218
257
  For elements with `backdrop-filter`, hide the old snapshot to avoid flash:
@@ -226,6 +265,37 @@ For elements with `backdrop-filter`, hide the old snapshot to avoid flash:
226
265
  }
227
266
  ```
228
267
 
268
+ ### Floating Element Isolation (popovers, menus, tooltips, control clusters)
269
+
270
+ Same freeze as persistent chrome. A floating/interactive element left rendered while a background transition runs is otherwise captured in the `root` snapshot and flickers as it settles. Give it a real, unique `view-transition-name` (never `none` — that's the CSS default = no isolation) and:
271
+
272
+ ```css
273
+ ::view-transition-group(popover) {
274
+ animation: none;
275
+ z-index: 100;
276
+ }
277
+ ::view-transition-old(popover),
278
+ ::view-transition-new(popover) {
279
+ animation: none;
280
+ }
281
+ ```
282
+
283
+ ### Sliding Indicator (tab underline / segmented pill)
284
+
285
+ One shared-name indicator morphs between positions. Slide the group; disable old/new so the solid bar slides instead of cross-fading:
286
+
287
+ ```css
288
+ ::view-transition-group(.tab-underline) {
289
+ animation-duration: 220ms;
290
+ animation-timing-function: cubic-bezier(0.5, 0, 0.2, 1);
291
+ }
292
+ ::view-transition-old(.tab-underline),
293
+ ::view-transition-new(.tab-underline) {
294
+ animation: none;
295
+ height: 100%;
296
+ }
297
+ ```
298
+
229
299
  ---
230
300
 
231
301
  ## Reduced Motion
@@ -2,6 +2,8 @@
2
2
 
3
3
  Follow these steps in order when adding view transitions to an app. Each step builds on the previous one.
4
4
 
5
+ Use the official [React `<ViewTransition>` reference](https://react.dev/reference/react/ViewTransition) and [Next.js guide](https://nextjs.org/docs/app/guides/view-transitions) for API behavior. This file focuses on audit order, integration decisions, and verification.
6
+
5
7
  ## Step 1: Audit the App
6
8
 
7
9
  Before writing any code, scan the codebase thoroughly. Search for:
@@ -29,9 +31,9 @@ For each shared element (`name` prop), note every navigation where a pair forms
29
31
 
30
32
  ## Step 2: Add CSS Recipes
31
33
 
32
- Copy the **complete** CSS recipe set from `css-recipes.md` into your global stylesheet. This includes timing variables, shared keyframes, fade, slide (vertical), directional navigation (forward/back), shared element morph, persistent element isolation, and reduced motion.
34
+ Choose the animation pattern from the audit and this skill's guidance, then copy only the applicable sections from [css-recipes.md](css-recipes.md). Always include reduced motion. Add live-root, persistent-element, backdrop, or floating-element rules only when the audit found those surfaces.
33
35
 
34
- Do not write your own animation CSS — the recipes handle staggered timing, motion blur on morphs, and reduced motion that are easy to get wrong. You can customize timing variables (`--duration-exit`, `--duration-enter`, `--duration-move`) after the initial setup.
36
+ Customize timing after the structure works. Keep ordinary crossfades opacity-only; scope blur to a specific shared morph when it is intentional.
35
37
 
36
38
  ## Step 3: Isolate Persistent Elements
37
39
 
@@ -41,7 +43,7 @@ For every persistent element identified in Step 1, add a `viewTransitionName` st
41
43
  <header style={{ viewTransitionName: "site-header" }}>...</header>
42
44
  ```
43
45
 
44
- Then add the persistent element isolation CSS from `css-recipes.md` (prevents the element from animating during page transitions). If the element uses `backdrop-blur` or `backdrop-filter`, use the backdrop-blur workaround from `css-recipes.md` instead.
46
+ Then add the [Persistent Element Isolation](css-recipes.md#persistent-element-isolation) CSS (prevents the element from animating during page transitions). If the element uses `backdrop-blur` or `backdrop-filter`, use the [Backdrop-Blur Workaround](css-recipes.md#backdrop-blur-workaround) instead.
45
47
 
46
48
  If a Suspense fallback mirrors a persistent control (e.g., a skeleton search input), give both the real control and the skeleton the same `viewTransitionName` so they morph in place.
47
49
 
@@ -76,7 +78,7 @@ Then wrap each **page component** (not layout) in a type-keyed `<ViewTransition>
76
78
  </ViewTransition>
77
79
  ```
78
80
 
79
- The `nav-forward` and `nav-back` CSS classes from `css-recipes.md` produce horizontal slides. For simpler apps where directional motion isn't needed, a bare `<ViewTransition default="none">` wrapper with `enter="fade-in"` / `exit="fade-out"` works too.
81
+ The `nav-forward` and `nav-back` CSS classes from [Directional Navigation](css-recipes.md#directional-navigation) produce horizontal slides. For simpler apps where directional motion isn't needed, a bare `<ViewTransition default="none">` wrapper with `enter="fade-in"` / `exit="fade-out"` works too.
80
82
 
81
83
  Extract this into a reusable component so every page doesn't repeat the verbose type map:
82
84
 
@@ -120,11 +122,13 @@ For every `<Suspense>` boundary identified in Step 1, wrap the fallback and cont
120
122
  </Suspense>
121
123
  ```
122
124
 
123
- This example uses `slide-down` / `slide-up` for directional vertical motion. For a simpler reveal, a bare `<ViewTransition>` around the `<Suspense>` gives a cross-fade with zero configuration. Choose based on the spatial meaning — consult the "Choosing the Right Animation Style" table in the main skill file.
125
+ This example uses `slide-down` / `slide-up` for directional vertical motion. For a simpler reveal, a bare `<ViewTransition>` around the `<Suspense>` gives a cross-fade with zero configuration. Choose based on the spatial meaning described in the main skill.
124
126
 
125
127
  **Rules:**
126
128
  - Always use `default="none"` on the content `<ViewTransition>` to prevent re-animation on revalidation or unrelated transitions.
127
129
  - Use simple string props (not type maps) on Suspense `<ViewTransition>`s — Suspense resolves fire as separate transitions with no type, so type-keyed props won't match.
130
+ - A fallback/content `share` pair morphs between snapshots. Use it only when that interpolation is desired and does not distort layout or geometry.
131
+ - If the same element appears in **both** the fallback and the content (a title, a heading), it flickers on reveal — an opacity dip. Render it **outside** the `<Suspense>` boundary (or pin it), so it isn't in both. See [Suspense reveal flicker](patterns.md#suspense-reveal-flicker).
128
132
 
129
133
  ## Step 6: Add Shared Element Transitions
130
134
 
@@ -142,13 +146,14 @@ For every shared visual element identified in Step 1, add matching named `<ViewT
142
146
  </ViewTransition>
143
147
  ```
144
148
 
145
- The `share="morph"` class uses the morph recipe from `css-recipes.md` (controlled duration + motion blur). For a simpler cross-fade, use `share="auto"` (browser default).
149
+ The `share="morph"` class uses the [Shared Element Morph](css-recipes.md#shared-element-morph) recipe (controlled duration + motion blur). For a simpler cross-fade, use `share="auto"` (browser default).
146
150
 
147
- When list items contain shared elements, compose both patterns with two nested `<ViewTransition>` layers — see "Composing Shared Elements with List Identity" in `SKILL.md`.
151
+ When list items contain shared elements, compose both patterns with two nested `<ViewTransition>` layers — an outer keyed VT for list identity and an inner named VT for the cross-route pair. See [Composing Shared Elements with List Identity](../SKILL.md#composing-shared-elements-with-list-identity).
148
152
 
149
153
  **Rules:**
150
154
  - Names must be globally unique — use prefixes like `photo-${id}`.
151
155
  - Add `default="none"` on list-side shared elements to prevent per-item cross-fades on filter/search updates.
156
+ - The target must be **in the DOM at navigation time** for the pair to form. If it's behind a Suspense fallback (not rendered yet), no pair forms and it won't morph. It works when the target is present at the snapshot — render it above the data boundary, or have its data **cached/prefetched** so it resolves in time.
152
157
 
153
158
  ## Step 7: Verify Each Navigation Path
154
159
 
@@ -160,23 +165,6 @@ Walk through every row in the navigation map from Step 1 and confirm:
160
165
  - Do persistent elements stay static (not sliding with page content)?
161
166
  - Do Suspense reveals animate independently from directional navigations?
162
167
 
163
- If any path produces no animation or competing animations, revisit the relevant step.
164
-
165
- ---
166
-
167
- ## Common Mistakes
168
-
169
- - **Bare `<ViewTransition>` without props** — without `default="none"`, it fires the browser's default cross-fade on every transition (every navigation, every Suspense resolve, every revalidation). Always set `default="none"` and explicitly enable only the triggers you want.
170
- - **Directional `<ViewTransition>` in a layout** — layouts persist across navigations and never unmount/remount. `enter`/`exit` props won't fire on route changes. Place the outer type-keyed `<ViewTransition>` in each page component.
171
- - **Fade-out exit with shared element morphs** — the page dissolving conflicts with the morph. Use a directional slide exit instead.
172
- - **Writing custom animation CSS** — the recipes in `css-recipes.md` handle staggered timing, motion blur on morphs, and reduced motion. Copy them; don't reinvent them.
173
- - **Missing `default: "none"` in type-keyed objects** — TypeScript requires a `default` key, and without it the fallback is `"auto"` which fires on every transition.
174
- - **Type maps on Suspense reveals** — Suspense resolves fire as separate transitions with no type. Type-keyed props won't match — use simple string props instead.
175
- - **Raw `viewTransitionName` CSS to trigger animations** — React only calls `document.startViewTransition` when `<ViewTransition>` components are in the tree. A bare `viewTransitionName` style is for isolating elements from a parent's snapshot, not for triggering animations.
176
- - **`update` trigger for same-route navigations** — nested VTs inside the content steal the mutation from the parent, so `update` never fires on the outer VT. Use `key` + `name` + `share` instead.
177
- - **Named VT in a reusable component** — if a component with a named VT is rendered in both a modal/popover *and* a page, both mount simultaneously and break the morph. Make the name conditional or move it to the specific consumer.
178
- - **`router.back()` for back navigation** — `router.back()` triggers synchronous `popstate`, incompatible with view transitions. Use `router.push()` with an explicit URL.
179
-
180
- ---
168
+ If any path produces no animation or competing animations, use the symptom-driven [troubleshooting guide](troubleshooting.md).
181
169
 
182
- For Next.js-specific implementation steps (config flag, `transitionTypes` on `<Link>`, same-route dynamic segments), see `nextjs.md`.
170
+ For Next.js-specific implementation steps (`transitionTypes` on `<Link>`, prefetch behavior, and same-route dynamic segments), see [nextjs.md](nextjs.md).
@@ -2,41 +2,33 @@
2
2
 
3
3
  ## Setup
4
4
 
5
- `<ViewTransition>` works out of the box for `startTransition`/`Suspense` updates. To also animate `<Link>` navigations:
6
-
7
- ```js
8
- // next.config.js
9
- const nextConfig = {
10
- experimental: { viewTransition: true },
11
- };
12
- module.exports = nextConfig;
13
- ```
5
+ `<ViewTransition>` works in the App Router with no configuration. The bundled React channel includes it, and Next.js navigations run in React Transitions. Do **not** add the old `experimental.viewTransition` flag or install `react@canary` into a Next.js app.
6
+
7
+ Read the current [Next.js View Transitions guide](https://nextjs.org/docs/app/guides/view-transitions) and the matching guide under `node_modules/next/dist/docs/` before editing. The installed version is authoritative for flags and API signatures.
14
8
 
15
- This wraps every `<Link>` navigation in `document.startViewTransition`. Any VT with `default="auto"` fires on **every** link click — use `default="none"` to prevent competing animations.
9
+ Because every link click is a transition, any VT with `default="auto"` fires on **every** navigation — use `default="none"` to prevent competing animations.
16
10
 
17
- Do **not** install `react@canary` — see SKILL.md "Availability" for details.
11
+ For unexpected or broken animation behavior, see [troubleshooting.md](troubleshooting.md).
18
12
 
19
13
  ---
20
14
 
21
15
  ## Next.js Implementation Additions
22
16
 
23
- When following `implementation.md`, apply these additions:
17
+ When following [implementation.md](implementation.md), apply these additions:
24
18
 
25
- **After Step 2:** Enable the experimental flag above.
19
+ **Step 4:** Use `transitionTypes` on `<Link>` — see [The `transitionTypes` Prop](#the-transitiontypes-prop-on-nextlink). If the animation depends on dynamic destination content, also see [When Content Must Be Ready](#when-content-must-be-ready).
26
20
 
27
- **Step 4:** Use `transitionTypes` on `<Link>` — see "The `transitionTypes` Prop" section below for usage and availability.
28
-
29
- **After Step 6:** For same-route dynamic segments (e.g., `/collection/[slug]`), use the `key` + `name` + `share` pattern — see Same-Route Dynamic Segment Transitions below.
21
+ **After Step 6:** For same-route dynamic segments (e.g., `/collection/[slug]`), use the `key` + `name` + `share` pattern — see [Same-Route Dynamic Segment Transitions](#same-route-dynamic-segment-transitions).
30
22
 
31
23
  ---
32
24
 
33
25
  ## Layout-Level ViewTransition
34
26
 
35
- **Do NOT add a layout-level VT wrapping `{children}` if pages have their own VTs.** Nested VTs never fire enter/exit when inside a parent VT — page-level enter/exit will silently not work. Remove the layout VT entirely.
27
+ **Do NOT add a layout-level VT wrapping `{children}` if pages have their own VTs.** A nested VT skips its own enter/exit only when it mounts or unmounts *as one unit* with a parent VT, which is exactly what a layout VT wrapping `{children}` causes — page-level enter/exit will silently not work. Remove the layout VT entirely. Nesting is otherwise fine and sometimes required: a child VT inside a *persistent* parent VT fires enter/exit normally, and two nested boundaries are the intended shape for [shared elements inside list items](../SKILL.md#composing-shared-elements-with-list-identity).
36
28
 
37
29
  A bare `<ViewTransition>` in layout works only if pages have **no** VTs of their own.
38
30
 
39
- **Layouts persist across navigations** — `enter`/`exit` only fire on initial mount, not on route changes. Don't use type-keyed maps in layouts.
31
+ **Layouts persist across navigations** — `enter`/`exit` only fire on initial mount, not on route changes. Don't use type-keyed maps in layouts. Because layouts persist, chrome hosted in one (nav, sidebar, player) keeps its state across navigations for free — no `Activity` needed. Reserve `Activity` for in-page show/hide (see [Composing with Activity](patterns.md#composing-with-activity)).
40
32
 
41
33
  ---
42
34
 
@@ -45,12 +37,34 @@ A bare `<ViewTransition>` in layout works only if pages have **no** VTs of their
45
37
  No wrapper component needed, works in Server Components:
46
38
 
47
39
  ```tsx
48
- <Link href="/products/1" transitionTypes={['transition-to-detail']}>View Product</Link>
40
+ <Link href="/products/1" transitionTypes={['transition-to-detail']}>
41
+ View Product
42
+ </Link>
49
43
  ```
50
44
 
51
45
  Replaces the manual pattern of `onNavigate` + `startTransition` + `addTransitionType` + `router.push()`. Reserve manual `startTransition` for non-link interactions (buttons, forms).
52
46
 
53
- **Availability:** `transitionTypes` requires `experimental.viewTransition: true` and is available in Next.js 15+ canary builds and Next.js 16+. If unavailable, use `startTransition` + `addTransitionType` + `router.push()` (see Programmatic Navigation below). To check: `grep -r "transitionTypes" node_modules/next/dist/` — if no results, fall back to programmatic navigation.
47
+ **Availability:** `transitionTypes` shipped in **Next.js 16.2.0** (it is not gated on the `experimental.viewTransition` flag). If unavailable, use `startTransition` + `addTransitionType` + `router.push()` (see [Programmatic Navigation](#programmatic-navigation)). To check: `grep -r "transitionTypes" node_modules/next/dist/` — if no results, fall back to programmatic navigation.
48
+
49
+ ---
50
+
51
+ ## When Content Must Be Ready
52
+
53
+ A page transition can animate whatever Next.js renders during navigation, including a loading fallback. A shared content-to-content morph only works when the incoming content is ready as the navigation commits; content that has not rendered yet cannot form the incoming half of the pair.
54
+
55
+ When an animation depends on dynamic destination content, use Next.js prefetching and caching to make that content available ahead of time. `<Link>` automatically prefetches in production, but the default behavior for dynamic routes may only prefetch a shell or loading boundary. Set `prefetch={true}` to prefetch the full route, and cache the data needed to render the shared content.
56
+
57
+ ```tsx
58
+ <Link href={nextHref} prefetch={true} transitionTypes={['nav-forward']}>
59
+ Next
60
+ </Link>
61
+ ```
62
+
63
+ With Cache Components, put reusable route data in a cached scope such as `use cache` so prefetching can include it. If the destination remains behind an unresolved Suspense boundary, the route transition animates the fallback instead. The content resolves in a separate Suspense transition without the original `nav-forward` or `nav-back` type, so give that content its own reveal animation when needed.
64
+
65
+ Verify directional transitions in a production build with a cold client cache. Development mode does not run automatic `<Link>` prefetching.
66
+
67
+ See the Next.js [View Transitions guide](https://nextjs.org/docs/app/guides/view-transitions) and [Prefetching guide](https://nextjs.org/docs/app/guides/prefetching).
54
68
 
55
69
  ---
56
70
 
@@ -60,17 +74,20 @@ Replaces the manual pattern of `onNavigate` + `startTransition` + `addTransition
60
74
  'use client';
61
75
 
62
76
  import { useRouter } from 'next/navigation';
63
- import { startTransition, addTransitionType } from 'react';
64
77
 
65
- function handleNavigate(href: string) {
78
+ function DetailButton({ href }: { href: string }) {
66
79
  const router = useRouter();
67
- startTransition(() => {
68
- addTransitionType('nav-forward');
69
- router.push(href);
70
- });
80
+
81
+ return (
82
+ <button onClick={() => router.push(href, { transitionTypes: ['nav-forward'] })}>
83
+ Open
84
+ </button>
85
+ );
71
86
  }
72
87
  ```
73
88
 
89
+ The `transitionTypes` option adds the types inside the router's navigation Transition. Use `startTransition` + `addTransitionType` for non-navigation state updates, or as a fallback on Next.js versions without the router option.
90
+
74
91
  ---
75
92
 
76
93
  ## Server-Side Filtering with `router.replace`
@@ -83,15 +100,55 @@ For search/sort/filter that re-renders on the server (via URL params), use `star
83
100
  import { useRouter } from 'next/navigation';
84
101
  import { startTransition } from 'react';
85
102
 
86
- function handleSort(sort: string) {
103
+ function SortControl() {
87
104
  const router = useRouter();
88
- startTransition(() => {
89
- router.replace(`?sort=${sort}`);
90
- });
105
+
106
+ function handleSort(sort: string) {
107
+ startTransition(() => {
108
+ router.replace(`?sort=${sort}`);
109
+ });
110
+ }
111
+
112
+ return <button onClick={() => handleSort('newest')}>Newest</button>;
91
113
  }
92
114
  ```
93
115
 
94
- List items wrapped in `<ViewTransition key={item.id}>` will animate reorder. This is the server-component alternative to the client-side `useDeferredValue` pattern in `patterns.md`.
116
+ List items wrapped in `<ViewTransition key={item.id}>` will animate reorder. This is the server-component alternative to the client-side [Searchable Grid](patterns.md#searchable-grid-with-usedeferredvalue) pattern.
117
+
118
+ For immediate control feedback while the route commits, use `useOptimistic` for the button state but keep the animated list tied to the committed sort value. See [Exclude Elements with `useOptimistic`](patterns.md#exclude-elements-with-useoptimistic).
119
+
120
+ ---
121
+
122
+ ## Routing-Driven Tabs
123
+
124
+ The generalized sliding indicator ([Sliding Indicator](patterns.md#sliding-indicator-tabs)) driven by navigation instead of local state: tabs are `<Link>`s, `active` comes from the URL (a server prop), and `useOptimistic` slides the indicator instantly while the route commits. Key the mounted indicator to committed `active` so the bar lands where navigation actually settles.
125
+
126
+ ```tsx
127
+ 'use client';
128
+ import Link from 'next/link';
129
+ import { useOptimistic, useTransition, ViewTransition } from 'react';
130
+
131
+ export function Tabs({ tabs, active, indicatorName = 'tab-indicator' }) {
132
+ const [optimisticActive, setOptimisticActive] = useOptimistic(active);
133
+ const [, startTransition] = useTransition();
134
+ return (
135
+ <nav>
136
+ {tabs.map(t => (
137
+ <Link key={t.value} href={t.href} scroll={false}
138
+ aria-current={optimisticActive === t.value ? 'page' : undefined}
139
+ onNavigate={() => startTransition(() => setOptimisticActive(t.value))}>
140
+ <span>{t.label}</span>
141
+ {active === t.value && (
142
+ <ViewTransition name={indicatorName} share="tab-underline">
143
+ <span className="active-underline" aria-hidden />
144
+ </ViewTransition>
145
+ )}
146
+ </Link>
147
+ ))}
148
+ </nav>
149
+ );
150
+ }
151
+ ```
95
152
 
96
153
  ---
97
154
 
@@ -149,28 +206,28 @@ Same rules as explicit `<Suspense>`: use simple string props (not type maps) sin
149
206
  </ViewTransition>
150
207
  ```
151
208
 
209
+ If the pair's `share` is type-keyed (or classed via CSS that expects a type), every `<Link>` between the two views must carry the type via `transitionTypes` — a plain link click resolves the share map's `default`, and if that's `none` the morph silently never fires.
210
+
152
211
  ---
153
212
 
154
213
  ## Same-Route Dynamic Segment Transitions
155
214
 
156
- When navigating between dynamic segments of the same route (e.g., `/collection/[slug]`), the page stays mounted — enter/exit never fire. Use `key` + `name` + `share`:
215
+ When navigating between dynamic segments of the same route (e.g., `/collection/[slug]`), the router swaps subtrees keyed by the segment value rather than doing a plain unmount/mount — enter/exit don't fire reliably. Use `key` + `name` + `share`:
157
216
 
158
217
  ```tsx
159
218
  <Suspense fallback={<Skeleton />}>
160
- <ViewTransition key={slug} name={`collection-${slug}`} share="auto" default="none">
219
+ <ViewTransition key={slug} name="collection-content" share="auto" default="none">
161
220
  <Content slug={slug} />
162
221
  </ViewTransition>
163
222
  </Suspense>
164
223
  ```
165
224
 
166
225
  - `key={slug}` forces unmount/remount on change
167
- - `name` + `share="auto"` creates a shared element crossfade
226
+ - The stable `name` pairs the outgoing and incoming containers; `share="auto"` creates the crossfade
168
227
  - VT inside `<Suspense>` (without keying Suspense) keeps old content visible during loading
169
228
 
170
- ---
171
-
172
229
  ## Server Components
173
230
 
174
231
  - `<ViewTransition>` works in both Server and Client Components
175
232
  - `<Link transitionTypes>` works in Server Components — no `'use client'` needed
176
- - `addTransitionType` and `startTransition` for programmatic nav require Client Components
233
+ - `router.push(..., { transitionTypes })`, `addTransitionType`, and `startTransition` require Client Components