Filesystem routes, sections, dynamic segments; instant YES hero
Test / test (push) Successful in 23s
Test / test (push) Successful in 23s
The questions/ tree is the router now: ids derive from file paths
(index.yaml names its directory; explicit id still wins for legacy
content), actions and requires_chain accept relative refs, nested
non-index files infer followup, and _section.yaml applies qualifies/
requires_chain/responsible to everything under its directory. Dynamic
[name].yaml pages serve any /dir/<value> with the segment substituted
into {name} resource-key placeholders; submissions index their chain
node in a portal_chains KV so requires_chain pages can verify a
visitor's ?chain= lineage actually ends at the required question.
Loading uses one recursive git-trees call; question_lint walks
subdirectories the same way. Implements docs/design/filesystem-routes.md.
Also: the YES hero now starts at HTML parse time via an inline module
script (yes.js moved to public/ for a stable /yes.js the wasm binding
raw_module-imports too - snippet paths are per-build-hashed), with
hydration adopting the running instance; and both gesture containers
reserve their box in CSS so mounting doesn't shift content.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
b737e0a7e7
commit
452ea88fbf
+6
-5
@@ -122,11 +122,12 @@ fn find_feature(
|
||||
alternative: &str,
|
||||
feature_name: &str,
|
||||
) -> Result<crate::content::Feature, ServerFnError> {
|
||||
let question = state
|
||||
.questions
|
||||
.load()
|
||||
.get(question_id)
|
||||
.cloned()
|
||||
// resolve_question, not a plain map get: a dynamic page's client
|
||||
// holds its concrete path as the question id, and resolution is
|
||||
// also what substitutes the URL segment into the page's resource
|
||||
// keys - so this lookup is where a `/review/<record>` page's
|
||||
// feature acquires its record-specific key.
|
||||
let question = crate::content::resolve_question(&state.questions.load(), question_id)
|
||||
.ok_or_else(|| ServerFnError::new("unknown question"))?;
|
||||
question
|
||||
.alternatives
|
||||
|
||||
Reference in New Issue
Block a user