feat(workout): hide registry conversion from golden path
Let the Workout generated interaction builder satisfy DispatchRegistry directly and guard canonical sources/docs against .into_registry() so the beginner path does not teach manual registry conversion. req: examples/001 req: examples/006 req: public_api/002
This commit is contained in:
@@ -50,7 +50,7 @@ Keep it stable. Prefer pointers to canonical sources over copied structure, file
|
||||
- Avoid project trees, architecture maps, generated inventories, current file sizes, issue lists, TODO inventories, and other snapshots that will rot.
|
||||
- Stable commands: `cargo run -p hemx-xtask -- test`, `cargo check --workspace`, `redgate health --strict`. Use the xtask runner for full verification so jobs are capped from local CPU and memory. req: test/004
|
||||
- Run the workout product exemplar with `cargo run -p hemx-xtask -- workout dev` and open `http://127.0.0.1:3028`; set `HEMX_WORKOUT_ADDR=127.0.0.1:3030` if the default port is busy. Its durable visual direction and recovery expectations live in `examples/workout/DESIGN.md`. req: examples/001
|
||||
- Use the same Workout command surface for tests, production build, and mobile release: `cargo run -p hemx-xtask -- workout test`, `cargo run -p hemx-xtask -- workout build`, `HEMX_WORKOUT_ORIGIN=https://workout.example.com cargo run -p hemx-xtask -- workout mobile-release`, and `HEMX_WORKOUT_ORIGIN=https://workout.example.com cargo run -p hemx-xtask -- workout mobile-verify`; Android/iOS SDKs and signing remain external blockers, not repo-owned secrets. req: examples/006
|
||||
- Use the same Workout command surface for tests, production build, and mobile release: `cargo run -p hemx-xtask -- workout test`, `cargo run -p hemx-xtask -- workout build`, `HEMX_WORKOUT_ORIGIN=https://workout.example.com cargo run -p hemx-xtask -- workout mobile-release`, and `HEMX_WORKOUT_ORIGIN=https://workout.example.com cargo run -p hemx-xtask -- workout mobile-verify`; Android/iOS SDKs, store submission targets, and signing remain external blockers, not repo-owned secrets. req: examples/006
|
||||
- hemx core stays small: effects, typed ids, registries, and wire schema only.
|
||||
- Routing, auth, sessions, transport, transitions, sync, and storage belong in integration/user crates.
|
||||
- Public examples and beginner APIs should use generated resources and `IntoEffect`, not raw ids or runtime opcodes.
|
||||
|
||||
+1
-1
@@ -810,7 +810,7 @@ what a valid business email is.
|
||||
005 Canonical examples must not contain user-authored browser JavaScript. They may load the shared hemx runtime (`/hemx.js`) and may use declarative `data-hemx-*` attributes; inline `<script>`, `on*=` event handlers, and `javascript:` URLs are forbidden outside opaque leaf-widget examples.
|
||||
|
||||
### req: examples/006
|
||||
006 The Workout exemplar must have one boring command surface for local development, product tests, production server build, Android/iOS mobile release metadata, and mobile verification. The mobile commands must make app identity, version, production origin, runtime asset policy, cache/offline state policy, environment/secrets boundary, rollback expectation, and external store-signing/submission blockers explicit without adding a broad `hemx-mobile` framework.
|
||||
006 The Workout exemplar must have one boring command surface for local development, product tests, production server build, Android/iOS mobile release metadata, and mobile verification. The common path must use generated helpers instead of manual registry conversion. The mobile commands must make app identity, version, production origin, runtime asset policy, cache/offline state policy, environment/secrets boundary, rollback expectation, and external store-signing/submission blockers explicit without adding a broad `hemx-mobile` framework.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -724,7 +724,6 @@ pub fn interactions(state: AppState) -> impl hemx_axum::DispatchRegistry {
|
||||
ui::workout::record_native_haptic_ack,
|
||||
record_native_haptic_ack,
|
||||
)
|
||||
.into_registry()
|
||||
}
|
||||
|
||||
fn effects(state: &WorkoutState, status: impl Into<String>) -> impl IntoEffect {
|
||||
|
||||
@@ -64,6 +64,7 @@ fn canonical_examples_do_not_author_low_level_resource_plumbing() {
|
||||
"lower_html(",
|
||||
"render_html(",
|
||||
"HandlerRegistry",
|
||||
".into_registry()",
|
||||
"InteractionForm",
|
||||
"register_handle(",
|
||||
"SafeHtml",
|
||||
@@ -180,6 +181,7 @@ fn canonical_example_docs_do_not_teach_low_level_plumbing() {
|
||||
"EffectBatch",
|
||||
"manual registry",
|
||||
"HandlerRegistry",
|
||||
".into_registry()",
|
||||
"InteractionForm",
|
||||
"register_handle(",
|
||||
"lower_html(",
|
||||
|
||||
Reference in New Issue
Block a user