5 Commits
Author SHA1 Message Date
Bendik Aagaard Lynghaug 703e6b6356 Release 0.3.12
Test / test (push) Successful in 24s
Publish release / publish (push) Successful in 1m32s
2026-08-30 16:06:58 +02:00
Bendik Aagaard Lynghaug 2c545cd1b0 Voice preview stays hidden until there is something to play 2026-08-30 16:06:57 +02:00
Bendik Aagaard Lynghaug 47c894cc1d Release 0.3.11
Test / test (push) Successful in 25s
Publish release / publish (push) Successful in 1m32s
2026-08-30 16:02:42 +02:00
Bendik Aagaard LynghaugandClaude Fable 5 7bc59a65e0 Validate templated actions against the page pattern
resolve_question returns a clone with a concrete id, so is_dynamic()
on it was always false and every templated action failed lint.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-30 16:02:41 +02:00
Bendik Aagaard Lynghaug 243b6a5704 README: gesture and voice fields
Test / test (push) Successful in 24s
2026-08-30 16:00:25 +02:00
5 changed files with 44 additions and 8 deletions
Generated
+1 -1
View File
@@ -2948,7 +2948,7 @@ dependencies = [
[[package]] [[package]]
name = "portal" name = "portal"
version = "0.3.10" version = "0.3.12"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"arc-swap", "arc-swap",
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "portal" name = "portal"
version = "0.3.10" version = "0.3.12"
edition = "2021" edition = "2021"
[lib] [lib]
+10
View File
@@ -39,6 +39,16 @@ stream.
`requires_chain` gates a page on verifiable answer provenance next `requires_chain` gates a page on verifiable answer provenance next
to `qualifies`' Kanidm-group identity gate (see to `qualifies`' Kanidm-group identity gate (see
`docs/design/filesystem-routes.md`). `docs/design/filesystem-routes.md`).
- **Gesture and voice fields** (`gesture.js`, `voice.js`): a stroke
becomes a redoal gesture key through a relay (ADR-0013/0015 in the
redoal repo) - the input shows the key's own decode under the
stroke, who is at a similar shape now, and *places* with recordings
the visitor can pick to make that key theirs; a voice field records
in the browser and leaves the audio at a key. Actions may be
templated from the answer (`/shape/{curve.key}`) onto dynamic
pages, whose URL segment also fills `value: "{key}"` presets and
`url` resource sources; resource items with an https `audio` field
render a player.
- **Announced pages** (`src/announce.rs`): a question with an - **Announced pages** (`src/announce.rs`): a question with an
`event: {starts, duration, place}` window is announced in the `event: {starts, duration, place}` window is announced in the
header (not the footer nav) while the window is open, becomes a header (not the footer nav) while the window is open, becomes a
+26 -5
View File
@@ -1119,13 +1119,18 @@ pub fn validate_questions(
a a
}; };
let _ = probe; let _ = probe;
match resolve_question(questions, &filled) { // Match the pattern itself: resolve_question would
Some(target) if target.is_dynamic() => continue, // hand back a clone whose id is already concrete.
_ => anyhow::bail!( let lands = questions
.values()
.any(|q| q.is_dynamic() && path_matches(&q.id, &filled).is_some());
if lands {
continue;
}
anyhow::bail!(
"question {:?} alternative {:?}: templated action {:?} must land on a dynamic page ([name].yaml)", "question {:?} alternative {:?}: templated action {:?} must land on a dynamic page ([name].yaml)",
question.id, alternative.name, action question.id, alternative.name, action
), );
}
} }
match questions.get(action) { match questions.get(action) {
None => anyhow::bail!( None => anyhow::bail!(
@@ -2025,6 +2030,22 @@ alternatives:
assert_eq!(render_inline_markdown("[mail](mailto:bl@uhhm.no)"), "<a href=\"mailto:bl@uhhm.no\">mail</a>"); assert_eq!(render_inline_markdown("[mail](mailto:bl@uhhm.no)"), "<a href=\"mailto:bl@uhhm.no\">mail</a>");
} }
#[test]
fn templated_action_validates_against_the_dynamic_page() {
let landing: Question = serde_yaml::from_str(
"id: /\nname: L\nalternatives:\n - name: A\n action: /shape/{curve.key}\n",
)
.unwrap();
let place: Question = serde_yaml::from_str("id: /shape/[key]\nname: P\n").unwrap();
let mut qs = std::collections::HashMap::new();
qs.insert(landing.id.clone(), landing.clone());
qs.insert(place.id.clone(), place);
validate_questions(&qs, &Default::default()).unwrap();
let mut only_landing = std::collections::HashMap::new();
only_landing.insert(landing.id.clone(), landing);
assert!(validate_questions(&only_landing, &Default::default()).is_err());
}
#[test] #[test]
fn action_templates_from_responses() { fn action_templates_from_responses() {
let r = serde_json::json!({"curve": {"key": "20aa98", "points": [[0,0]]}, "n": 3}); let r = serde_json::json!({"curve": {"key": "20aa98", "points": [[0,0]]}, "n": 3});
+5
View File
@@ -499,6 +499,11 @@ main.not-found {
margin-top: 0.4rem; margin-top: 0.4rem;
} }
/* display:block above would beat the hidden attribute */
.voice-preview[hidden] {
display: none;
}
/* links inside markdown descriptions */ /* links inside markdown descriptions */
.alt-description a, .alt-description a,
.feature p a { .feature p a {