cabloy 5.1.60 → 5.1.62

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 (232) hide show
  1. package/.claude/hooks/contract-loop-gate.ts +296 -0
  2. package/.claude/settings.json +16 -0
  3. package/.claude/skills/cabloy-backend-scaffold/SKILL.md +2 -0
  4. package/.claude/skills/cabloy-backend-scaffold/references/follow-up-checklist.md +1 -0
  5. package/.claude/skills/cabloy-contract-loop/SKILL.md +89 -16
  6. package/.claude/skills/cabloy-contract-loop/references/contract-loop-map.md +102 -14
  7. package/.claude/skills/cabloy-contract-loop/references/resource-custom-state-pattern.md +4 -0
  8. package/.claude/skills/cabloy-contract-loop/references/verification-checklist.md +32 -14
  9. package/.claude/skills/cabloy-domain-planning/SKILL.md +212 -0
  10. package/.claude/skills/cabloy-frontend-scaffold/SKILL.md +13 -0
  11. package/.claude/skills/cabloy-frontend-scaffold/references/follow-up-checklist.md +2 -0
  12. package/.claude/skills/cabloy-module-removal/SKILL.md +144 -0
  13. package/.claude/skills/cabloy-resource-field-update/SKILL.md +7 -0
  14. package/.claude/skills/cabloy-zova-source-reading/SKILL.md +221 -0
  15. package/.claude/skills/cabloy-zova-source-reading/references/analysis-modes.md +91 -0
  16. package/.claude/skills/cabloy-zova-source-reading/references/core-reading-paths.md +117 -0
  17. package/CHANGELOG.md +64 -0
  18. package/CLAUDE.md +11 -0
  19. package/cabloy-docs/.vitepress/config.mjs +197 -5
  20. package/cabloy-docs/ai/cli-to-skill-map.md +7 -0
  21. package/cabloy-docs/ai/docs-skills-rules-mapping.md +22 -0
  22. package/cabloy-docs/ai/future-skill-roadmap.md +12 -7
  23. package/cabloy-docs/ai/introduction.md +1 -0
  24. package/cabloy-docs/ai/playbook-backend-module.md +6 -0
  25. package/cabloy-docs/ai/playbook-module-removal.md +164 -0
  26. package/cabloy-docs/ai/skills.md +12 -0
  27. package/cabloy-docs/backend/backend-contract-emission-output-inspection.md +189 -0
  28. package/cabloy-docs/backend/backend-contract-emission-source-reading-map.md +160 -0
  29. package/cabloy-docs/backend/backend-contract-emission-specimen.md +170 -0
  30. package/cabloy-docs/backend/backend-resource-module-contract-chain.md +323 -0
  31. package/cabloy-docs/backend/backend-source-reading-debug-checklist.md +173 -0
  32. package/cabloy-docs/backend/backend-source-reading-roadmap.md +129 -0
  33. package/cabloy-docs/backend/backend-source-reading-verify-playbook.md +166 -0
  34. package/cabloy-docs/backend/bean-scene-authoring.md +4 -4
  35. package/cabloy-docs/backend/broadcast-guide.md +3 -3
  36. package/cabloy-docs/backend/cli.md +20 -11
  37. package/cabloy-docs/backend/config-guide.md +4 -4
  38. package/cabloy-docs/backend/controller-aop-guide.md +10 -10
  39. package/cabloy-docs/backend/controller-guide.md +12 -2
  40. package/cabloy-docs/backend/crud-workflow.md +7 -3
  41. package/cabloy-docs/backend/dto-guide.md +18 -2
  42. package/cabloy-docs/backend/dto-infer-generation.md +201 -25
  43. package/cabloy-docs/backend/election-guide.md +2 -2
  44. package/cabloy-docs/backend/entity-guide.md +30 -3
  45. package/cabloy-docs/backend/error-guide.md +3 -3
  46. package/cabloy-docs/backend/event-guide.md +4 -4
  47. package/cabloy-docs/backend/external-aop-guide.md +2 -2
  48. package/cabloy-docs/backend/field-indexes.md +9 -3
  49. package/cabloy-docs/backend/foundation.md +8 -8
  50. package/cabloy-docs/backend/i18n-guide.md +6 -6
  51. package/cabloy-docs/backend/internal-aop-guide.md +2 -2
  52. package/cabloy-docs/backend/introduction.md +15 -0
  53. package/cabloy-docs/backend/migration-and-changes.md +3 -3
  54. package/cabloy-docs/backend/model-guide.md +16 -6
  55. package/cabloy-docs/backend/openapi-guide.md +3 -0
  56. package/cabloy-docs/backend/queue-guide.md +3 -3
  57. package/cabloy-docs/backend/redlock-guide.md +2 -2
  58. package/cabloy-docs/backend/schedule-guide.md +2 -2
  59. package/cabloy-docs/backend/scripts.md +8 -0
  60. package/cabloy-docs/backend/serialization-guide.md +12 -2
  61. package/cabloy-docs/backend/service-guide.md +18 -9
  62. package/cabloy-docs/backend/startup-guide.md +5 -5
  63. package/cabloy-docs/backend/status-guide.md +271 -0
  64. package/cabloy-docs/backend/unit-testing.md +3 -3
  65. package/cabloy-docs/backend/vona-source-reading-map.md +157 -0
  66. package/cabloy-docs/backend/websocket-protocol-guide.md +5 -5
  67. package/cabloy-docs/backend/websocket-usage-guide.md +15 -8
  68. package/cabloy-docs/frontend/a-model-under-the-hood.md +281 -0
  69. package/cabloy-docs/frontend/a-openapi-under-the-hood.md +248 -0
  70. package/cabloy-docs/frontend/a-router-guide.md +307 -0
  71. package/cabloy-docs/frontend/api-guide.md +6 -4
  72. package/cabloy-docs/frontend/api-schema-guide.md +1 -0
  73. package/cabloy-docs/frontend/app-startup-guide.md +7 -4
  74. package/cabloy-docs/frontend/bean-scene-authoring.md +3 -1
  75. package/cabloy-docs/frontend/behavior-guide.md +16 -16
  76. package/cabloy-docs/frontend/cli.md +14 -2
  77. package/cabloy-docs/frontend/command-scene-authoring.md +504 -0
  78. package/cabloy-docs/frontend/component-guide.md +5 -5
  79. package/cabloy-docs/frontend/component-props-guide.md +1 -1
  80. package/cabloy-docs/frontend/component-v-model-guide.md +2 -2
  81. package/cabloy-docs/frontend/design-principles.md +6 -0
  82. package/cabloy-docs/frontend/fetch-interceptor-guide.md +440 -0
  83. package/cabloy-docs/frontend/filter-query-select-data-flow-guide.md +260 -0
  84. package/cabloy-docs/frontend/form-guide.md +786 -0
  85. package/cabloy-docs/frontend/form-scene-to-page-meta-guide.md +303 -0
  86. package/cabloy-docs/frontend/foundation.md +33 -0
  87. package/cabloy-docs/frontend/frontend-source-reading-roadmap.md +249 -0
  88. package/cabloy-docs/frontend/generated-contract-consumption-debug-checklist.md +190 -0
  89. package/cabloy-docs/frontend/generated-contract-consumption-entry-branch.md +205 -0
  90. package/cabloy-docs/frontend/generated-contract-consumption-list-branch.md +157 -0
  91. package/cabloy-docs/frontend/generated-contract-consumption-specimen.md +203 -0
  92. package/cabloy-docs/frontend/generated-contract-consumption-verify-playbook.md +189 -0
  93. package/cabloy-docs/frontend/generic-component-guide.md +1 -1
  94. package/cabloy-docs/frontend/introduction.md +38 -5
  95. package/cabloy-docs/frontend/ioc-and-beans.md +6 -0
  96. package/cabloy-docs/frontend/mock-guide.md +1 -0
  97. package/cabloy-docs/frontend/model-architecture.md +288 -39
  98. package/cabloy-docs/frontend/model-resource-best-practices.md +379 -0
  99. package/cabloy-docs/frontend/model-resource-cookbook.md +508 -0
  100. package/cabloy-docs/frontend/model-resource-internals-deep-dive.md +238 -0
  101. package/cabloy-docs/frontend/model-resource-owner-pattern.md +402 -0
  102. package/cabloy-docs/frontend/model-resource-usage-guide.md +334 -0
  103. package/cabloy-docs/frontend/model-state-guide.md +371 -15
  104. package/cabloy-docs/frontend/module-scope.md +8 -8
  105. package/cabloy-docs/frontend/modules-and-suites.md +2 -1
  106. package/cabloy-docs/frontend/navigation-guards-guide.md +7 -0
  107. package/cabloy-docs/frontend/openapi-sdk-guide.md +17 -6
  108. package/cabloy-docs/frontend/page-guide.md +15 -9
  109. package/cabloy-docs/frontend/page-meta-guide.md +466 -0
  110. package/cabloy-docs/frontend/page-params-guide.md +3 -3
  111. package/cabloy-docs/frontend/page-query-guide.md +2 -2
  112. package/cabloy-docs/frontend/page-route-guide.md +6 -0
  113. package/cabloy-docs/frontend/permission-formscene-action-visibility-guide.md +263 -0
  114. package/cabloy-docs/frontend/quickstart.md +18 -2
  115. package/cabloy-docs/frontend/reading-zova-for-vue-developers.md +266 -0
  116. package/cabloy-docs/frontend/resource-entry-page-deep-dive.md +271 -0
  117. package/cabloy-docs/frontend/resource-list-page-deep-dive.md +279 -0
  118. package/cabloy-docs/frontend/rest-resource-source-reading-map.md +522 -0
  119. package/cabloy-docs/frontend/rest-resource-under-the-hood.md +622 -0
  120. package/cabloy-docs/frontend/root-behaviors-guide.md +282 -0
  121. package/cabloy-docs/frontend/route-alias-guide.md +6 -0
  122. package/cabloy-docs/frontend/router-stack-guide.md +229 -0
  123. package/cabloy-docs/frontend/router-tabs-introduction.md +26 -3
  124. package/cabloy-docs/frontend/router-tabs-layout-integration.md +367 -0
  125. package/cabloy-docs/frontend/router-tabs-mechanism.md +6 -0
  126. package/cabloy-docs/frontend/router-tabs-route-meta-cookbook.md +7 -0
  127. package/cabloy-docs/frontend/router-tabs-vs-stack.md +167 -0
  128. package/cabloy-docs/frontend/router-view-hosts-guide.md +450 -0
  129. package/cabloy-docs/frontend/server-data.md +4 -1
  130. package/cabloy-docs/frontend/system-startup-guide.md +2 -2
  131. package/cabloy-docs/frontend/table-action-visibility-permission-flow-guide.md +263 -0
  132. package/cabloy-docs/frontend/table-cell-cookbook.md +568 -0
  133. package/cabloy-docs/frontend/table-guide.md +373 -0
  134. package/cabloy-docs/frontend/table-resource-crud-cookbook.md +496 -0
  135. package/cabloy-docs/frontend/zova-app-guide.md +251 -0
  136. package/cabloy-docs/frontend/zova-form-source-reading-map.md +293 -0
  137. package/cabloy-docs/frontend/zova-form-under-the-hood.md +561 -0
  138. package/cabloy-docs/frontend/zova-reactivity-under-the-hood.md +320 -0
  139. package/cabloy-docs/frontend/zova-router-under-the-hood.md +561 -0
  140. package/cabloy-docs/frontend/zova-source-reading-map.md +421 -0
  141. package/cabloy-docs/frontend/zova-table-controller-render-supplement.md +225 -0
  142. package/cabloy-docs/frontend/zova-table-source-reading-map.md +317 -0
  143. package/cabloy-docs/frontend/zova-table-under-the-hood.md +532 -0
  144. package/cabloy-docs/frontend/zova-vs-vue3-comparison.md +308 -0
  145. package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions-debug-checklist.md +245 -0
  146. package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions-source-reading-map.md +139 -0
  147. package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions-verify-playbook.md +248 -0
  148. package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions.md +511 -0
  149. package/cabloy-docs/fullstack/contract-loop-playbook.md +356 -0
  150. package/cabloy-docs/fullstack/edition-collaboration-differences.md +6 -0
  151. package/cabloy-docs/fullstack/frontend-metadata-to-backend.md +199 -23
  152. package/cabloy-docs/fullstack/introduction.md +15 -1
  153. package/cabloy-docs/fullstack/openapi-to-sdk.md +135 -11
  154. package/cabloy-docs/fullstack/suites-and-modules.md +333 -0
  155. package/cabloy-docs/fullstack/tutorial-1-first-module.md +3 -0
  156. package/cabloy-docs/fullstack/tutorial-2-first-crud.md +4 -0
  157. package/cabloy-docs/fullstack/tutorial-3-frontend-metadata-sharing.md +6 -2
  158. package/cabloy-docs/fullstack/tutorial-4-custom-level-renderers.md +60 -23
  159. package/cabloy-docs/fullstack/tutorial-5-backend-contract-sharing.md +14 -7
  160. package/cabloy-docs/fullstack/tutorial-6-one-contract-four-uses.md +6 -0
  161. package/cabloy-docs/fullstack/tutorials-overview.md +17 -4
  162. package/cabloy-docs/reference/bean-scene-boilerplates.md +15 -13
  163. package/cabloy-docs/reference/package-map.md +4 -3
  164. package/package.json +2 -1
  165. package/scripts/init.ts +2 -18
  166. package/scripts/initTestData.ts +25 -0
  167. package/scripts/upgrade.ts +17 -2
  168. package/vona/pnpm-lock.yaml +48 -194
  169. package/vona/src/suite/a-training/modules/training-student/package.json +53 -0
  170. package/vona/src/suite/a-training/modules/training-student/src/.metadata/index.ts +400 -0
  171. package/vona/src/suite/a-training/modules/training-student/src/.metadata/locales.ts +18 -0
  172. package/vona/src/suite/a-training/modules/training-student/src/.metadata/this.ts +2 -0
  173. package/vona/src/suite/a-training/modules/training-student/src/bean/meta.index.ts +12 -0
  174. package/vona/src/suite/a-training/modules/training-student/src/bean/meta.version.ts +21 -0
  175. package/vona/src/suite/a-training/modules/training-student/src/bean/ssrMenu.student.ts +29 -0
  176. package/vona/src/suite/a-training/modules/training-student/src/config/locale/en-us.ts +15 -0
  177. package/vona/src/suite/a-training/modules/training-student/src/config/locale/zh-cn.ts +15 -0
  178. package/vona/src/suite/a-training/modules/training-student/src/controller/student.ts +74 -0
  179. package/vona/src/suite/a-training/modules/training-student/src/dto/studentCreate.tsx +28 -0
  180. package/vona/src/suite/a-training/modules/training-student/src/dto/studentSelectReq.tsx +44 -0
  181. package/vona/src/suite/a-training/modules/training-student/src/dto/studentSelectRes.tsx +11 -0
  182. package/vona/src/suite/a-training/modules/training-student/src/dto/studentSelectResItem.tsx +45 -0
  183. package/vona/src/suite/a-training/modules/training-student/src/dto/studentSummary.tsx +42 -0
  184. package/vona/src/suite/a-training/modules/training-student/src/dto/studentUpdate.tsx +28 -0
  185. package/vona/src/suite/a-training/modules/training-student/src/dto/studentView.tsx +25 -0
  186. package/vona/src/suite/a-training/modules/training-student/src/entity/student.tsx +84 -0
  187. package/vona/src/suite/a-training/modules/training-student/src/index.ts +2 -0
  188. package/vona/src/suite/a-training/modules/training-student/src/model/student.ts +10 -0
  189. package/vona/src/suite/a-training/modules/training-student/src/service/student.ts +57 -0
  190. package/vona/src/suite/a-training/modules/training-student/test/student.test.ts +173 -0
  191. package/vona/src/suite/a-training/modules/training-student/tsconfig.build.json +11 -0
  192. package/vona/src/suite/a-training/modules/training-student/tsconfig.json +7 -0
  193. package/vona/src/suite/a-training/package.json +12 -0
  194. package/vona/src/suite/a-training/tsconfig.base.json +4 -0
  195. package/vona/src/suite/a-training/tsconfig.json +10 -0
  196. package/zova/packages-cli/cli/package.json +2 -2
  197. package/zova/packages-cli/cli-set-front/cli/templates/openapi/config/boilerplate/module/openapi.config.ts +6 -1
  198. package/zova/packages-cli/cli-set-front/package.json +1 -1
  199. package/zova/packages-cli/cli-set-front/src/lib/bean/cli.openapi.generate.ts +34 -4
  200. package/zova/packages-zova/zova/package.json +2 -2
  201. package/zova/pnpm-lock.yaml +416 -690
  202. package/zova/src/suite/a-training/modules/training-student/cli/openapi.config.ts +9 -0
  203. package/zova/src/suite/a-training/modules/training-student/package.json +52 -0
  204. package/zova/src/suite/a-training/modules/training-student/src/.metadata/component/formFieldLevel.ts +31 -0
  205. package/zova/src/suite/a-training/modules/training-student/src/.metadata/index.ts +258 -0
  206. package/zova/src/suite/a-training/modules/training-student/src/.metadata/locales.ts +7 -0
  207. package/zova/src/suite/a-training/modules/training-student/src/.metadata/this.ts +2 -0
  208. package/zova/src/suite/a-training/modules/training-student/src/api/openapi/baseURL.ts +5 -0
  209. package/zova/src/suite/a-training/modules/training-student/src/api/openapi/index.ts +3 -0
  210. package/zova/src/suite/a-training/modules/training-student/src/api/openapi/schemas.ts +196 -0
  211. package/zova/src/suite/a-training/modules/training-student/src/api/openapi/types.ts +4146 -0
  212. package/zova/src/suite/a-training/modules/training-student/src/api/trainingStudent.ts +151 -0
  213. package/zova/src/suite/a-training/modules/training-student/src/apiSchema/trainingStudent.ts +43 -0
  214. package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.actionDeleteForce.tsx +51 -0
  215. package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.actionSummary.tsx +56 -0
  216. package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.level.tsx +63 -0
  217. package/zova/src/suite/a-training/modules/training-student/src/component/formFieldLevel/controller.tsx +117 -0
  218. package/zova/src/suite/a-training/modules/training-student/src/config/locale/en-us.ts +9 -0
  219. package/zova/src/suite/a-training/modules/training-student/src/config/locale/zh-cn.ts +9 -0
  220. package/zova/src/suite/a-training/modules/training-student/src/index.ts +2 -0
  221. package/zova/src/suite/a-training/modules/training-student/src/model/student.ts +42 -0
  222. package/zova/src/suite/a-training/modules/training-student/tsconfig.build.json +13 -0
  223. package/zova/src/suite/a-training/modules/training-student/tsconfig.json +5 -0
  224. package/zova/src/suite/a-training/package.json +12 -0
  225. package/zova/src/suite/a-training/tsconfig.base.json +4 -0
  226. package/zova/src/suite/a-training/tsconfig.json +4 -0
  227. package/zova/src/suite/cabloy-basic/modules/basic-select/src/component/formFieldSelect/controller.tsx +29 -7
  228. package/zova/src/suite/cabloy-basic/modules/basic-select/src/component/select/controller.tsx +34 -11
  229. package/zova/src/suite-vendor/a-zova/modules/a-table/package.json +1 -1
  230. package/zova/src/suite-vendor/a-zova/modules/a-table/src/component/table/controller.tsx +3 -3
  231. package/zova/src/suite-vendor/a-zova/modules/a-table/src/lib/tableCell.ts +1 -1
  232. package/zova/src/suite-vendor/a-zova/package.json +2 -2
@@ -0,0 +1,263 @@
1
+ # Permission, formScene, and Action Visibility Guide
2
+
3
+ This guide explains how action visibility works in current Cabloy Basic entry pages when `formScene` participates in the decision.
4
+
5
+ Use this page when you want to understand:
6
+
7
+ - how `permissionHint.formScene` works
8
+ - how it interacts with `$$pageEntry.formMeta.formScene`
9
+ - how that differs from `$passport.checkPermission(...)`
10
+ - why some actions can be scene-gated while others cannot
11
+ - why bulk actions do not currently support `formScene`
12
+
13
+ ## Why this page exists
14
+
15
+ Several existing docs already explain nearby pieces:
16
+
17
+ - [Form Scene to Page Meta Guide](/frontend/form-scene-to-page-meta-guide) explains how `formScene` becomes `formMeta`, then `pageMeta`
18
+ - [Page Meta Guide](/frontend/page-meta-guide) explains shell/task presentation
19
+ - [Model Resource Owner Pattern](/frontend/model-resource-owner-pattern) and related resource-model docs explain permissions as part of resource ownership
20
+
21
+ What those pages do not isolate directly is the specific runtime rule for entry-page action visibility.
22
+
23
+ That is the gap this page fills.
24
+
25
+ In the current Basic source, `formScene` participates in action visibility as a **UI visibility filter** layered in front of the normal permission authorization check.
26
+
27
+ ## The shortest accurate mental model
28
+
29
+ A practical mental model is:
30
+
31
+ 1. page-entry runtime decides the current `formScene`
32
+ 2. `formMetaFromFormScene(...)` derives `formMeta`
33
+ 3. `$$pageEntry.formMeta.formScene` becomes the current scene surface for entry-page blocks
34
+ 4. `blockToolbarRow` reads `permissionHint.formScene`
35
+ 5. if the current scene does not match, the action is hidden immediately
36
+ 6. if the scene matches, `$passport.checkPermission(...)` still decides whether the action is allowed by permission rules
37
+ 7. the action renders only if both checks pass
38
+
39
+ That means `formScene` is not itself a permission engine. It is a scene-aware visibility prefilter.
40
+
41
+ ## What this guide is not
42
+
43
+ This page is not a general permission guide for every frontend action surface.
44
+
45
+ It is specifically about the current **entry-page** action visibility flow.
46
+
47
+ It is also not a guide to page-meta propagation. `pageMeta.formMeta` is part of the surrounding story, but the actual visibility authority for entry-page actions is the local page-entry runtime context.
48
+
49
+ ## Source-confirmed reading path
50
+
51
+ When reading this topic, use this order:
52
+
53
+ 1. `zova/src/suite-vendor/a-zova/modules/a-form/src/lib/utils.ts`
54
+ 2. `zova/src/suite/cabloy-basic/modules/basic-pageentry/src/component/blockPageEntry/controller.tsx`
55
+ 3. `zova/src/suite/cabloy-basic/modules/basic-pageentry/src/component/blockToolbarRow/controller.tsx`
56
+ 4. `zova/src/suite-vendor/a-zova/modules/a-openapi/src/types/permissions.ts`
57
+ 5. `zova/src/suite-vendor/a-zova/modules/a-openapi/src/types/resource/formActionRow.ts`
58
+ 6. `zova/src/suite-vendor/a-zova/modules/a-openapi/src/types/resource/tableActionRow.ts`
59
+ 7. `zova/src/suite-vendor/a-zova/modules/a-openapi/src/types/resource/tableActionBulk.ts`
60
+ 8. optional comparison: `zova/src/suite/cabloy-basic/modules/basic-table/src/bean/tableCell.actionOperationsRow.tsx`
61
+
62
+ That order moves from scene/meta translation, to page-entry runtime ownership, to action-row filtering, to permission-hint typing, and finally to the bulk-action limitation and row-action comparison.
63
+
64
+ ## Visibility flow step by step
65
+
66
+ ### 1. `formScene` becomes canonical runtime metadata
67
+
68
+ The canonical helper lives in:
69
+
70
+ ```text
71
+ zova/src/suite-vendor/a-zova/modules/a-form/src/lib/utils.ts
72
+ ```
73
+
74
+ The current source confirms:
75
+
76
+ - `view` -> `formMode: 'view'`
77
+ - `create` -> `formMode: 'edit', editMode: 'create'`
78
+ - `edit` -> `formMode: 'edit', editMode: 'update'`
79
+
80
+ This matters because action visibility does not read an arbitrary raw string from anywhere in the app. It reads the current page-entry scene after that scene has already become part of the page-entry runtime metadata.
81
+
82
+ ### 2. `blockPageEntry` exposes the current scene through `$$pageEntry`
83
+
84
+ The key entry-page runtime file is:
85
+
86
+ ```text
87
+ zova/src/suite/cabloy-basic/modules/basic-pageentry/src/component/blockPageEntry/controller.tsx
88
+ ```
89
+
90
+ This controller:
91
+
92
+ - resolves `formScene`
93
+ - computes `formMeta`
94
+ - builds the shared JSX render context
95
+ - exposes `$$pageEntry` into that context
96
+
97
+ That is the key boundary for action visibility:
98
+
99
+ - entry-page actions do not need to rediscover the current scene
100
+ - they can read it from `$$pageEntry.formMeta.formScene`
101
+
102
+ ## 3. `blockToolbarRow` checks scene first, then permission
103
+
104
+ The most important source file for this guide is:
105
+
106
+ ```text
107
+ zova/src/suite/cabloy-basic/modules/basic-pageentry/src/component/blockToolbarRow/controller.tsx
108
+ ```
109
+
110
+ Its action loop does two different checks:
111
+
112
+ 1. `_checkFormScene(permissionHint)`
113
+ 2. `$passport.checkPermission(...)`
114
+
115
+ The order matters.
116
+
117
+ ### Scene prefilter
118
+
119
+ `_checkFormScene(...)`:
120
+
121
+ - reads `$$pageEntry.formMeta.formScene`
122
+ - reads `permissionHint?.formScene`
123
+ - accepts a single scene or an array of scenes
124
+ - treats no `formScene` hint as “all scenes”
125
+
126
+ If the scene does not match, the action does not continue into the permission check.
127
+
128
+ ### Authorization check
129
+
130
+ Only after the scene passes does the controller call:
131
+
132
+ - `$passport.checkPermission(this.permissions, actionName, permissionHint)`
133
+
134
+ This is the critical source-confirmed distinction:
135
+
136
+ - **scene filtering** decides whether this action should even be considered in the current page-entry scene
137
+ - **permission checking** decides whether the user is allowed to perform it
138
+
139
+ ## 4. What `permissionHint.formScene` really means
140
+
141
+ `permissionHint.formScene` should be read as:
142
+
143
+ - a UI visibility filter tied to the current page-entry scene
144
+
145
+ It should **not** be read as:
146
+
147
+ - a replacement for permission authorization
148
+ - a generic global permission-engine rule
149
+ - a page-meta-driven shell rule
150
+
151
+ A practical reading rule is:
152
+
153
+ - if the scene is wrong, hide the action
154
+ - if the scene is right, still run the real permission check
155
+
156
+ ## 5. What the permission types confirm
157
+
158
+ The permission hint types live in:
159
+
160
+ ```text
161
+ zova/src/suite-vendor/a-zova/modules/a-openapi/src/types/permissions.ts
162
+ ```
163
+
164
+ The important source-confirmed detail is:
165
+
166
+ - `IPermissionHintGeneral` can carry `formScene`
167
+ - `IPermissionHintTableActionRow` can carry `formScene`
168
+ - `IPermissionHintTableActionBulk` does **not** carry `formScene`
169
+
170
+ This matches the current runtime split:
171
+
172
+ - entry-page row/form action visibility can be scene-aware
173
+ - bulk-action visibility is not scene-aware in the same way today
174
+
175
+ ## 6. Row/form action types vs bulk action types
176
+
177
+ The row/form action option types live in:
178
+
179
+ - `a-openapi/src/types/resource/formActionRow.ts`
180
+ - `a-openapi/src/types/resource/tableActionRow.ts`
181
+
182
+ They both use `permission?: IPermissionHintTableActionRow`.
183
+
184
+ That means row-style action definitions can express `formScene` in their permission hints.
185
+
186
+ By contrast, bulk action options live in:
187
+
188
+ - `a-openapi/src/types/resource/tableActionBulk.ts`
189
+
190
+ That type uses:
191
+
192
+ - `permission?: IPermissionHintTableActionBulk`
193
+
194
+ And that bulk hint type does not have `formScene`.
195
+
196
+ This is the clearest public type-level explanation for the current limitation.
197
+
198
+ ## 7. Why bulk actions are different today
199
+
200
+ Bulk actions are typed around bulk permission hints, not row/form-scene hints.
201
+
202
+ So in current Basic source, you should not claim that bulk actions support scene-based filtering the same way entry-page toolbar actions do.
203
+
204
+ This is not only a docs distinction. It is a source-confirmed contract distinction.
205
+
206
+ ## 8. Comparison with table row actions
207
+
208
+ A useful comparison file is:
209
+
210
+ ```text
211
+ zova/src/suite/cabloy-basic/modules/basic-table/src/bean/tableCell.actionOperationsRow.tsx
212
+ ```
213
+
214
+ This table-row action surface uses permission checks, but it does not add the same local page-entry `formScene` prefilter path as `blockToolbarRow`.
215
+
216
+ That makes the current entry-page toolbar flow more specific:
217
+
218
+ - it is tied to entry-page runtime context
219
+ - it is not the universal rule for every action surface in the frontend
220
+
221
+ ## 9. Boundary with page meta
222
+
223
+ A common confusion is to think that because `formMeta` also becomes part of page meta, page meta is the authority for action visibility.
224
+
225
+ That is not the current source-confirmed rule.
226
+
227
+ The better boundary is:
228
+
229
+ - `pageMeta.formMeta` is shell/task presentation state
230
+ - `$$pageEntry.formMeta.formScene` is the local page-entry runtime surface that `blockToolbarRow` reads for scene filtering
231
+
232
+ So for action visibility, the local page-entry context is the authority.
233
+
234
+ ## 10. Bulk-action limitation
235
+
236
+ The current public Basic source supports this rule clearly:
237
+
238
+ - row/form action hints can be scene-aware
239
+ - bulk action hints are not scene-aware today
240
+
241
+ If a contributor needs scene-aware bulk visibility, they should first verify whether the type and runtime contracts are being extended, rather than assuming the row-action rule applies automatically.
242
+
243
+ ## Where to read next
244
+
245
+ Use these next steps depending on your question:
246
+
247
+ - if you want the full `formScene -> formMeta -> pageMeta -> shell/tab` bridge, read [Form Scene to Page Meta Guide](/frontend/form-scene-to-page-meta-guide)
248
+ - if you want the broader entry-page runtime path, read [Resource Entry Page Deep Dive](/frontend/resource-entry-page-deep-dive)
249
+ - if you want the list-page row/bulk contrast, read [Table Action Visibility and Permission Flow Guide](/frontend/table-action-visibility-permission-flow-guide)
250
+ - if you want shell/task presentation semantics, read [Page Meta Guide](/frontend/page-meta-guide)
251
+ - if you want the underlying resource permission/model context, read [Model Resource Owner Pattern](/frontend/model-resource-owner-pattern)
252
+
253
+ ## Final takeaway
254
+
255
+ The most accurate rule for current Cabloy Basic entry-page action visibility is:
256
+
257
+ - `permissionHint.formScene` is a scene-aware visibility prefilter
258
+ - `$$pageEntry.formMeta.formScene` is the current scene source
259
+ - `$passport.checkPermission(...)` is still the actual authorization check
260
+ - the action renders only if both layers pass
261
+ - bulk actions do not currently carry `formScene` in their permission hints
262
+
263
+ That is the source-confirmed `permission / formScene / action visibility` path in the current Basic frontend architecture.
@@ -127,8 +127,10 @@ This is why route metadata, guards, aliases, and theme/header/menu behavior shou
127
127
  Read together with:
128
128
 
129
129
  - [Page Route Guide](/frontend/page-route-guide)
130
- - [Navigation Guards Guide](/frontend/navigation-guards-guide)
131
130
  - [Route Alias Guide](/frontend/route-alias-guide)
131
+ - [Navigation Guards Guide](/frontend/navigation-guards-guide)
132
+ - [Zova Router Under the Hood](/frontend/zova-router-under-the-hood)
133
+ - [Router View Hosts Guide](/frontend/router-view-hosts-guide)
132
134
  - [Theme Guide](/frontend/theme-guide)
133
135
 
134
136
  ## Step 6: reach the first routed page
@@ -150,6 +152,8 @@ Read next:
150
152
  - [Frontend CLI](/frontend/cli)
151
153
  - [Page Guide](/frontend/page-guide)
152
154
  - [Page Route Guide](/frontend/page-route-guide)
155
+ - [Zova Router Under the Hood](/frontend/zova-router-under-the-hood)
156
+ - [Router View Hosts Guide](/frontend/router-view-hosts-guide)
153
157
 
154
158
  ## Step 7: understand menu and CLI ergonomics
155
159
 
@@ -173,6 +177,8 @@ Read next:
173
177
  - [Frontend Scripts](/frontend/scripts)
174
178
  - [Environment and Config Guide](/frontend/environment-config-guide)
175
179
  - [Page Route Guide](/frontend/page-route-guide)
180
+ - [Zova Router Under the Hood](/frontend/zova-router-under-the-hood)
181
+ - [Router View Hosts Guide](/frontend/router-view-hosts-guide)
176
182
  - [Theme Guide](/frontend/theme-guide)
177
183
 
178
184
  ### I want to understand startup and routing
@@ -180,14 +186,20 @@ Read next:
180
186
  - [System Startup Guide](/frontend/system-startup-guide)
181
187
  - [App Startup Guide](/frontend/app-startup-guide)
182
188
  - [Page Route Guide](/frontend/page-route-guide)
183
- - [Navigation Guards Guide](/frontend/navigation-guards-guide)
184
189
  - [Route Alias Guide](/frontend/route-alias-guide)
190
+ - [Navigation Guards Guide](/frontend/navigation-guards-guide)
191
+ - [Zova Router Under the Hood](/frontend/zova-router-under-the-hood)
192
+ - [Router View Hosts Guide](/frontend/router-view-hosts-guide)
193
+ - [Router Tabs Introduction](/frontend/router-tabs-introduction)
194
+ - [Router Tabs Layout Integration](/frontend/router-tabs-layout-integration)
185
195
 
186
196
  ### I want to create my first page
187
197
 
188
198
  - [Frontend CLI](/frontend/cli)
189
199
  - [Page Guide](/frontend/page-guide)
190
200
  - [Page Route Guide](/frontend/page-route-guide)
201
+ - [Zova Router Under the Hood](/frontend/zova-router-under-the-hood)
202
+ - [Router View Hosts Guide](/frontend/router-view-hosts-guide)
191
203
 
192
204
  ### I need edition-sensitive guidance
193
205
 
@@ -200,4 +212,8 @@ Read next:
200
212
 
201
213
  - [Frontend (Zova)](/frontend/introduction)
202
214
  - [Frontend Foundation](/frontend/foundation)
215
+ - [Reading Zova for Vue Developers](/frontend/reading-zova-for-vue-developers)
216
+ - [Zova vs Vue 3 Comparison](/frontend/zova-vs-vue3-comparison)
217
+ - [Zova Reactivity Under the Hood](/frontend/zova-reactivity-under-the-hood)
218
+ - [Zova Source Reading Map](/frontend/zova-source-reading-map)
203
219
  - [Design Principles](/frontend/design-principles)
@@ -0,0 +1,266 @@
1
+ # Reading Zova for Vue Developers
2
+
3
+ This guide is for readers who already know Vue 3 and want the shortest accurate path to reading Zova source code without forcing generic Vue assumptions onto it.
4
+
5
+ ## Why this page exists
6
+
7
+ When Vue developers first open Zova code, several things can feel unfamiliar at the same time:
8
+
9
+ - page and component logic lives in controller classes
10
+ - plain class fields behave reactively
11
+ - derived state is often wired in `__init__`
12
+ - render logic is written in TSX and can live in a controller or a dedicated render bean
13
+ - state sharing is organized through IoC containers and bean scopes rather than a pile of unrelated patterns
14
+
15
+ If you read Zova as "Vue with unusual syntax," you will miss the architectural point.
16
+
17
+ A better starting point is:
18
+
19
+ - **Vue still provides the reactive foundation**
20
+ - **Zova changes the preferred programming model built on top of that foundation**
21
+
22
+ ## The shortest accurate mental model
23
+
24
+ If you only remember one paragraph, remember this one:
25
+
26
+ > Zova keeps Vue 3 reactivity underneath, but moves the main authoring surface from `setup()` locals and explicit `ref/reactive` values toward IoC-managed reactive bean instances such as page controllers, component controllers, service beans, and model beans.
27
+
28
+ That is why Zova code often reads more like controller-oriented application code than like a typical Vue single-file-component or composable-first codebase.
29
+
30
+ ## Quick translation table
31
+
32
+ | If you usually think in Vue terms | Read Zova like this instead |
33
+ | --- | --- |
34
+ | `setup()` is the main wiring point | `__init__` and bean lifecycle are major wiring points |
35
+ | `ref` / `reactive` are the visible state hosts | controller and bean instances are the visible state hosts |
36
+ | `computed()` creates local derived refs | `$computed()` usually creates instance-level derived state |
37
+ | `useRoute()` pulls route state into the component | page controllers expose `$route`, `$params`, and `$query` as part of the controller surface |
38
+ | `provide/inject`, composables, props, and stores are separate sharing tools | bean scopes and IoC are used to unify more sharing patterns under one model |
39
+ | template or component render is the obvious center | controller-oriented architecture is the center; render can stay in the controller or move into render beans |
40
+
41
+ ## Start from the right assumptions
42
+
43
+ ### 1. Do not assume Zova wants to end at `ref.value`
44
+
45
+ Zova intentionally aims for code that feels closer to direct variable usage than `ref/reactive`-heavy business code.
46
+
47
+ That does **not** mean Zova rejects Vue reactivity. It means Zova tries to hide more of the reactive primitive management behind a different framework surface.
48
+
49
+ Read together with:
50
+
51
+ - [Design Principles](/frontend/design-principles)
52
+ - [Foundation](/frontend/foundation)
53
+
54
+ ### 2. Do not treat IoC as a small convenience layer
55
+
56
+ In Zova, IoC is not only about injecting a helper or two.
57
+
58
+ It is part of the larger architectural answer for:
59
+
60
+ - state ownership
61
+ - state sharing
62
+ - cross-module composition
63
+ - lifecycle structure
64
+ - extensibility
65
+
66
+ Read together with:
67
+
68
+ - [IoC and Beans](/frontend/ioc-and-beans)
69
+ - [Module Scope](/frontend/module-scope)
70
+ - [Modules and Suites](/frontend/modules-and-suites)
71
+
72
+ ### 3. Do not collapse page, component, service, and model code into one generic Vue component mental model
73
+
74
+ Zova gives different bean types different architectural jobs.
75
+
76
+ For example:
77
+
78
+ - page controllers organize page-local state and route-aware behavior
79
+ - component controllers organize reusable UI units
80
+ - service beans can own extracted business state or behavior
81
+ - model beans organize broader state categories such as async, local-storage, cookie, or in-memory data
82
+
83
+ Read together with:
84
+
85
+ - [Page Guide](/frontend/page-guide)
86
+ - [Component Guide](/frontend/component-guide)
87
+ - [Model Architecture](/frontend/model-architecture)
88
+ - [Model State Guide](/frontend/model-state-guide)
89
+
90
+ ## A concrete specimen to read first
91
+
92
+ If you want one small example that shows the Zova coding style clearly, start with the demo page controller in the public source tree:
93
+
94
+ ```text
95
+ zova/src/suite/a-demo/modules/demo-basic/src/page/state/controller.tsx
96
+ ```
97
+
98
+ The important things to notice in that file are:
99
+
100
+ - `count` is a plain class field
101
+ - `count2` is wired in `__init__` through `$computed`
102
+ - actions are plain class methods such as `increment()` and `decrement()`
103
+ - `render()` reads the instance fields directly
104
+
105
+ A Vue-first reader often expects this kind of code to be rewritten into `setup()` plus `ref` plus `computed`. That is exactly the instinct you should suspend while reading Zova.
106
+
107
+ ## How to read the reactive path under the surface
108
+
109
+ For the example above, a practical source-reading path is:
110
+
111
+ 1. the example controller in `zova/src/suite/a-demo/modules/demo-basic/src/page/state/controller.tsx`
112
+ 2. `zova/packages-zova/zova-core/src/composables/useController.ts`
113
+ 3. `zova/packages-zova/zova-core/src/bean/beanContainer.ts`
114
+ 4. `zova/packages-zova/zova-core/src/bean/beanBase.ts`
115
+ 5. `zova/packages-zova/zova-core/src/core/context/component.ts`
116
+ 6. `zova/src/suite-vendor/a-zova/modules/a-router/src/monkey.ts`
117
+
118
+ A compact interpretation of those files is:
119
+
120
+ - `useController.ts` creates and loads the controller bean
121
+ - `beanContainer.ts` is where bean instances become reactive and container-managed
122
+ - `beanBase.ts` exposes helpers such as `$computed`, `$watch`, and `$toRef`
123
+ - `component.ts` patches the component render flow so controller-driven render logic participates in normal frontend updates
124
+ - `a-router/src/monkey.ts` pushes page route state onto page controllers
125
+
126
+ This is the main reason Zova can feel so different while still standing on top of Vue runtime behavior.
127
+
128
+ If you want the next layer down, continue with [Zova Reactivity Under the Hood](/frontend/zova-reactivity-under-the-hood).
129
+
130
+ ## Six practical differences Vue developers usually feel first
131
+
132
+ ### 1. The visible state host is the controller instance
133
+
134
+ A Vue developer often expects to see:
135
+
136
+ ```typescript
137
+ const count = ref(0);
138
+ ```
139
+
140
+ A Zova reader will more often see:
141
+
142
+ ```typescript
143
+ count: number = 0;
144
+ ```
145
+
146
+ The important idea is not only less syntax. The important idea is that the framework is making the bean instance itself the main business-facing state surface.
147
+
148
+ ### 2. Derived state is written as instance wiring
149
+
150
+ Instead of thinking:
151
+
152
+ ```typescript
153
+ const count2 = computed(() => `=== ${count.value} ===`);
154
+ ```
155
+
156
+ Zova often reads more like:
157
+
158
+ ```typescript
159
+ protected async __init__() {
160
+ this.count2 = this.$computed(() => {
161
+ return `=== ${this.count} ===`;
162
+ });
163
+ }
164
+ ```
165
+
166
+ That makes derived state feel like part of object initialization rather than only part of a local `setup()` assembly.
167
+
168
+ ### 3. Actions are ordinary methods
169
+
170
+ Instead of scattering behavior through closures returned from `setup()`, Zova often keeps page or component actions as plain methods on the controller instance.
171
+
172
+ That is one reason Zova business code can read more like application controller code.
173
+
174
+ ### 4. Route state is part of the page-controller surface
175
+
176
+ A Vue reader often looks for `useRoute()` first.
177
+
178
+ In Zova, a page controller often expects route-aware behavior through members such as:
179
+
180
+ - `$route`
181
+ - `$params`
182
+ - `$query`
183
+
184
+ For the route-oriented mental model, also see [Page Route Guide](/frontend/page-route-guide).
185
+
186
+ ### 5. State sharing is more architecture-driven
187
+
188
+ Vue projects often combine several independent techniques:
189
+
190
+ - props and emits
191
+ - composables
192
+ - `provide/inject`
193
+ - store layers
194
+
195
+ Zova tries to keep more of that within the bean and scope architecture, so the first question becomes less "which unrelated mechanism should I use?" and more "which bean owns this state and which scope should that bean live in?"
196
+
197
+ ### 6. Render is controller-oriented, not only component-file-oriented
198
+
199
+ A Vue reader might assume that moving code out of a large page means immediately creating more composables or child components.
200
+
201
+ In Zova, a common growth path is:
202
+
203
+ - start with a single page controller
204
+ - split render into a render bean when the page grows
205
+ - split style into a style bean when needed
206
+ - extract business state or logic into service beans when that becomes clearer
207
+
208
+ That growth path is one of the main reasons you should read Zova pages through the page/controller architecture instead of through a generic component-file lens.
209
+
210
+ ## A practical reading order for Vue developers
211
+
212
+ If you want the shortest path from Vue familiarity to Zova fluency, use this order:
213
+
214
+ 1. [Foundation](/frontend/foundation)
215
+ 2. [Design Principles](/frontend/design-principles)
216
+ 3. [IoC and Beans](/frontend/ioc-and-beans)
217
+ 4. [Page Guide](/frontend/page-guide)
218
+ 5. [Component Guide](/frontend/component-guide)
219
+ 6. [Model Architecture](/frontend/model-architecture)
220
+ 7. [Page Route Guide](/frontend/page-route-guide)
221
+ 8. [Behavior Guide](/frontend/behavior-guide)
222
+
223
+ Use this order when:
224
+
225
+ - you already know Vue
226
+ - you want to read Zova source code accurately
227
+ - you want to avoid rewriting framework-specific code back toward generic Vue habits
228
+
229
+ ## Common mistakes to avoid
230
+
231
+ ### Mistake 1: "This should become a normal Vue SFC"
232
+
233
+ Usually the better question is whether the existing controller, render bean, style bean, or service/model bean boundaries are already the intended Zova architecture.
234
+
235
+ ### Mistake 2: "If I do not see `ref`, there is no real reactivity"
236
+
237
+ The reactive foundation is still there. The framework is simply exposing a different authoring surface.
238
+
239
+ ### Mistake 3: "IoC only matters for dependency injection"
240
+
241
+ In Zova, IoC is tied to structure, sharing scope, extensibility, and long-term maintainability.
242
+
243
+ ### Mistake 4: "Route state should always be pulled locally by composables"
244
+
245
+ For page controllers, route-aware behavior is deliberately pushed into the controller surface so the page model stays cohesive.
246
+
247
+ ### Mistake 5: "Model state is just another local store choice"
248
+
249
+ The model layer is one of Zova’s larger architectural answers for unified state categories, SSR-aware state handling, caching, and persistence-oriented behavior.
250
+
251
+ ## Edition note
252
+
253
+ This reading guide is about the shared Zova frontend architecture, not about one UI library.
254
+
255
+ That means the architectural reading model applies across Cabloy Basic and Cabloy Start. However, UI-sensitive examples can still diverge:
256
+
257
+ - Cabloy Basic public examples currently align with DaisyUI + Tailwind CSS
258
+ - Cabloy Start aligns with Vuetify-oriented UI workflows and may differ in modules, SSR site baselines, and project assets
259
+
260
+ So when your task becomes UI-specific rather than architecture-specific, detect the active edition before assuming a component or theme workflow.
261
+
262
+ ## Final takeaway
263
+
264
+ If Vue teaches you to think in terms of reactive primitives and local composition, Zova asks you to think in terms of reactive framework-managed objects with explicit architectural roles.
265
+
266
+ That is the mental shift that makes the rest of the source tree much easier to read.