Side A adds substantial new functionality and infrastructure: an extensible external URL foundation with GitHub resolution, on-demand system ingests (`WriteCmd::SystemIngest`), URL normalization changes, resolver cooldown state, UI actions for external resolution, external preview handling, and accompanying parser and browser tests. Side B is a focused improvement that switches vote links to use `display_path` instead of storage URLs and strengthens the vote-pool browser test by exercising all 45 pairings and asserting the resulting ranking, but it does not introduce comparable lasting capabilities.
constitution · epochs · watch · epoch 3
c_b21d271b1b82 (tommy-mor) vs c_4a5c84c0a37b (tommy-mor)
download prompt · raw event · cmp_1a7120f56e975b
council reasoning
Side A introduces a substantial new capability: an extensible external resolver system with a full GitHub integration, new write path (SystemIngest), UI actions, state management, and URL normalization changes, all backed by tests. Side B is a narrow improvement—switching vote URLs to display paths and strengthening a browser test—which is useful but comparatively minor in scope and lasting architectural impact.
Side A introduces a substantial new extensible URL and external resolution foundation: it adds a GitHubResolver with API integration, cooldown tracking in AppState, a new SystemIngest write path, DSL support for fenced JSON bodies, URL normalization changes, UI controls, and end-to-end browser tests. Side B is a focused improvement to vote_compare_href/vote_pool_href to use display_path plus a stronger browser test asserting all 45 pairwise votes and final ranking, which is valuable but much narrower in scope and architectural impact.
Side A implements a substantial, well-tested feature set (GitHub external resolver with rate-limiting, URL identity normalization overhaul stripping tracking params, UI actions and templates, new AppState fields, agents.md doc updates, and a full browser test) representing significant lasting architectural value. Side B is a small, focused bugfix (using display_path in vote hrefs) plus a stronger test, which is valuable but far narrower in scope and impact than Side A's broad foundational work.
A delivers lasting product infrastructure: URL identity redesign (strip query/fragment by default, GitHub/YouTube canonicalization), a full on-demand GitHub resolver with SystemIngest, cooldowns, UI, and E2E coverage. B is a correct, focused fix (display_path in vote hrefs) plus a much stronger 45-pair ranking assertion, but its scope and durability are much narrower than A’s foundation and feature work.
sides
A — c_b21d271b1b82 (tommy-mor)
message
[06b48801] Implement extensible URL foundation (#145) * Implement extensible URL foundation Co-authored-by: tommy <thmorriss@gmail.com> * Make query params non-identity by default Co-authored-by: tommy <thmorriss@gmail.com> * Fix external href helper test scope Co-authored-by: tommy <thmorriss@gmail.com> * Avoid broken external previews for blocked hosts Co-authored-by: tommy <thmorriss@gmail.com> * Clarify external empty state copy Co-authored-by: tommy <thmorriss@gmail.com> * Add on-demand GitHub external resolver Co-authored-by: tommy <thmorriss@gmail.com> * Add fenced JSON bodies for GitHub resolver Co-authored-by: tommy <thmorriss@gmail.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
diff preview
diff --git a/agents.md b/agents.md
index 59bd2174f4d2f972a45123fe10d408aa5881ee93..c66f33789441eea193b4354fce4c03b7fffdd639 100644
--- a/agents.md
+++ b/agents.md
@@ -55,6 +55,7 @@ Strict **CSP** that blocks `eval` would break the current app. Other projects ma
| Ingests, grants, rooms, identity tokens, agent binds, redactions, etc. | **JSONL** | Appended in `server/src/api/rpc.rs`, `server/src/api/auth.rs` (and related paths) before updating `ReducerState` |
| **`RoomMintInvite` links** | **RAM only** | `AppState.invites` — not appended as `InviteMinted` today; **lost on restart** (`server/src/state.rs`, `server/src/api/rpc.rs`). Event types `InviteMinted` / `InviteRedeemed` exist for replay and a possible future persisted mint (`server/src/reducer.rs`). |
| **OAuth / pending sessions** | **RAM only** | `AppState.pending_sessions` (`server/src/state.rs`, `server/src/api/auth.rs`) |
+| **External resolver cooldowns** | **RAM only** | `AppState.resolver_runs` — debounce/rate-limit guard for on-demand resolver buttons. Resolver results themselves are durable synthetic `Ingest` events in `events.jsonl`. |
| **Reducer projection** | **Derived** | Rebuilt from log on startup; not separately persisted |
If you add a new ephemeral map or start persisting something that was RAM-only, **update this table and the code comments** (`server/src/state.rs` is a good anchor).
diff --git a/server/src/api/ui_html.rs b/server/src/api/ui_html.rs
index 7cbda3876451687aa7a55547fc06bbe86ac9d260..cd501ba6d4d656eabad03afed4583efdf885695d 100644
--- a/server/src/api/ui_html.rs
+++ b/server/src/api/ui_html.rs
@@ -18,14 +18,15 @@ use crate::{
rpc::{rpc_post_redact, rpc_post_with_bearer, rpc_room_delete},
},
canonical_path::canonicalize_tag,
+ external_resolver::resolve_github_children,
+ html::vote_compare_post_success_js,
html::{
- fragment_new_thread_slot, login_to_post_hint_markup,
- parse_html_ui_from_form, room_members_section_markup, thread_feed_html,
- thread_feed_html_for_room, thread_feed_region_markup, thread_ui_collapse_redacted_post,
- thread_ui_expand_post_full, thread_ui_expand_redacted_post, ui_js_warn, user_can_post_room,
- user_can_view_room, HtmlUiAction, JsBuilder, ThreadNav,
+ fragment_new_thread_slot, login_to_post_hint_markup, parse_html_ui_from_form,
+ room_members_section_markup, thread_feed_html, thread_feed_html_for_room,
+ thread_feed_region_markup, thread_ui_collapse_redacted_post, thread_ui_expand_post_full,
+ thread_ui_expand_redacted_post, ui_js_warn, user_can_post_room, user_can_view_room,
+ HtmlUiAction, JsBuilder, ThreadNav,
},
- html::vote_compare_post_success_js,
reducer::{scope_from_room_wire, ScopeId},
state::AppState,
};
@@ -104,26 +105,35 @@ async fn dispatch_ui_action(
)
.into_response();
}
- match rpc_post_with_bearer(state, &session.bearer, room.clone(), thread_tag.clone(), text).await {
- Ok(RpcResult::PostOk { .. }) => {
- post_success_response(
- state,
- &room,
- &thread_tag,
- error_target.as_ref(),
- form_id.as_ref(),
- Some(session.username.as_str()),
- )
- .await
- .into_response()
- }
+ match rpc_post_with_bearer(
+ state,
+ &session.bearer,
+ room.clone(),
+ thread_tag.clone(),
+ text,
+ )
+ .await
+ {
+ Ok(RpcResult::PostOk { .. }) => post_success_response(
+ state,
+ &room,
+ &thread_tag,
+ error_target.as_ref(),
+ form_id.as_ref(),
+ Some(session.username.as_str()),
+ )
+ .await
+ .into_response(),
Ok(_) => form_js_error(
error_target.as_ref(),
"unexpected response",
"Post did not return PostOk.",
)
.into_response(),
- Err((msg, hint)) => form_js_error(error_target.as_ref(), &msg, hint.as_deref().unwrap_or("")).into_response(),
+ Err((msg, hint)) => {
+ form_js_error(error_target.as_ref(), &msg, hint.as_deref().unwrap_or(""))
+ .into_response()
+ }
}
}
HtmlUiAction::CheckIngest {
@@ -150,9 +160,19 @@ async fn dispatch_ui_action(
return js_clear_errors(&form_error_target(error_target.as_ref())).into_response();
}
match rpc_check_with_bearer(state, &session.bearer, room, text.clone()).await {
- Ok(RpcResult::CheckOk { .. }) => js_clear_errors(&form_error_target(error_target.as_ref())).into_response(),
- Ok(_) => form_js_error(error_target.as_ref(), "unexpected response", "Check did not return CheckOk.").into_response(),
- Err((msg, hint)) => form_js_error(error_target.as_ref(), &msg, hint.as_deref().unwrap_or("")).into_response(),
+ Ok(RpcResult::CheckOk { .. }) => {
+ js_clear_errors(&form_error_target(error_target.as_ref())).into_response()
+ }
+ Ok(_) => form_js_error(
+ error_target.as_ref(),
+ "unexpected response",
+ "Check did not return CheckOk.",
+ )
+ .into_response(),
+ Err((msg, hint)) => {
+ form_js_error(error_target.as_ref(), &msg, hint.as_deref().unwrap_or(""))
+ .into_response()
+ }
}
}
HtmlUiAction::VoteComparePost {
@@ -167,7 +187,11 @@ async fn dispatch_ui_action(
form_action,
} => {
if form_action != "/ui" {
- return (StatusCode::BAD_REQUEST, "invalid vote_compare_post form_action").into_response();
+ return (
+ StatusCode::BAD_REQUEST,
+ "invalid vote_compare_post form_action",
+ )
+ .into_response();
}
let Some(session) = session else {
return js_redirect("/login").into_response();
@@ -195,23 +219,15 @@ async fn dispatch_ui_action(
let left_id = match crate::path_types::ItemId::parse(left_item.trim()) {
Some(i) => i.normalized_storage(),
None => {
- return form_js_error(
- err_tgt.as_ref(),
- "bad item",
- "Invalid left item path.",
- )
- .into_response();
+ return form_js_error(err_tgt.as_ref(), "bad item", "Invalid left item path.")
+ .into_response();
}
};
let right_id = match crate::path_types::ItemId::parse(right_item.trim()) {
Some(i) => i.normalized_storage(),
None => {
- return form_js_error(
- err_tgt.as_ref(),
- "bad item",
- "Invalid right item path.",
- )
- .into_response();
+ return form_js_error(err_tgt.as_ref(), "bad item", "Invalid right item path.")
+ .into_response();
}
};
let mut rl = ratio_left.trim().parse::<i32>().unwrap_or(0).max(0);
@@ -231,7 +247,15 @@ async fn dispatch_ui_action(
right_id.as_str()
);
- match rpc_post_with_bearer(state, &session.bearer, room.clone(), thread_tag.clone(), text).await {
+ match rpc_post_with_bearer(
+ state,
+ &session.bearer,
+ room.clone(),
+ thread_tag.clone(),
+ text,
+ )
+ .await
+ {
Ok(RpcResult::PostOk {
post_id,
post_index,
@@ -277,7 +301,10 @@ async fn dispatch_ui_action(
"Post did not return PostOk.",
)
.into_response(),
- Err((msg, hint)) => form_js_error(err_tgt.as_ref(), &msg, hint.as_deref().unwrap_or("")).into_response(),
+ Err((msg, hint)) => {
+ form_js_error(err_tgt.as_ref(), &msg, hint.as_deref().unwrap_or(""))
+ .into_response()
+ }
}
}
HtmlUiAction::SetGardenPin {
@@ -288,7 +315,11 @@ async fn dispatch_ui_action(
form_action,
} => {
if form_action != "/ui" {
- return (StatusCode::BAD_REQUEST, "invalid set_garden_pin form_action").into_response();
+ return (
+ StatusCode::BAD_REQUEST,
+ "invalid set_garden_pin form_action",
+ )
+ .into_response();
}
let next_path = sanitize_garden_pin_next(&next);
use crate::html::{encode_pin_cookie_value, GARDEN_PIN_COOKIE};
@@ -301,7 +332,11 @@ async fn dispatch_ui_action(
if room.is_empty() {
return (StatusCode::BAD_REQUEST, "missing room").into_response();
}
- let Some(raw) = item_storage.as_ref().map(|s| s.trim().to_string()).filter(|s| !s.is_empty()) else {
+ let Some(raw) = item_storage
+ .as_ref()
+ .map(|s| s.trim().to_string())
+ .filter(|s| !s.is_empty())
+ else {
return (StatusCode::BAD_REQUEST, "missing item").into_response();
};
let Some(item) = ItemId::parse(&raw) else {
@@ -309,16 +344,65 @@ async fn dispatch_ui_action(
};
let item = item.normalized_storage();
let val = encode_pin_cookie_value(&room, item.as_str());
- let cookie = format!("{GARDEN_PIN_COOKIE}={val}; Path=/; SameSite=Lax; Max-Age=7776000");
+ let cookie =
+ format!("{GARDEN_PIN_COOKIE}={val}; Path=/; SameSite=Lax; Max-Age=7776000");
redirect_with_pin_cookie(&cookie, &next_path)
}
+ HtmlUiAction::ResolveExternal {
+ room_wire,
+ item_storage,
+ mode,
+ next,
+ form_action,
+ } => {
+ if form_action != "/ui" {
+ return (
+ StatusCode::BAD_REQUEST,
+ "invalid resolve_external form_action",
+ )
+ .into_response();
+ }
+ let Some(session) = session else {
+ return js_redirect("/login").into_response();
+ };
+ let room = room_wire.trim();
+ if room.is_empty() {
+ return ui_js_warn("missing room").into_response();
+ }
+ let reduced = state.reduced.read().await;
+ if matches!(scope_from_room_wire(room), ScopeId::Room(_)) {
+ if !user_can_post_room(&reduced, room, &session.username) {
+ drop(reduced);
+ return ui_js_warn("forbidden").into_response();
+ }
+ }
+ drop(reduced);
+
+ let Some(item) = crate::path_types::ItemId::parse(item_storage.trim()) else {
+ return ui_js_warn("bad item").into_response();
+ };
+ let target = if mode.trim() == "siblings" {
+ m
… preview truncated; 74,788 characters omittedB — c_4a5c84c0a37b (tommy-mor)
message
[0728c06a] Vote pool: use display_path in hrefs; test all 45 pairs + assert ranking. - vote_compare_href and vote_pool_href now encode ~/… and -/… as their short display forms (not the full https://slug.social/… storage URL), matching what users see in the item display and DSL. - Rewrite browser_vote_pool test to vote all C(10,2)=45 pairs in the pool, always preferring the alphabetically-earlier letter, then query GetGardenRank and assert the 10 items form one component ranked a→j. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
diff preview
diff --git a/server/src/html/garden/vote.rs b/server/src/html/garden/vote.rs
index 2682cfcbd2f834b56459a02831aa225cffe67c58..d0ec78cd675eae284d056fb3b8eaf5cc853d6263 100644
--- a/server/src/html/garden/vote.rs
+++ b/server/src/html/garden/vote.rs
@@ -234,8 +234,10 @@ pub(super) fn vote_compare_href(
thread_override: Option<&str>,
pool: Option<&ItemId>,
) -> String {
- let left_q = urlencoding::encode(left.as_str());
- let right_q = urlencoding::encode(right.as_str());
+ let left_dp = left.display_path();
+ let right_dp = right.display_path();
+ let left_q = urlencoding::encode(&left_dp);
+ let right_q = urlencoding::encode(&right_dp);
let mut base = format!(
"{}/vote?left={}&right={}",
nav.room_path_prefix_for_vote_compare(),
@@ -246,16 +248,20 @@ pub(super) fn vote_compare_href(
base = format!("{}&thread={}", base, urlencoding::encode(t));
}
if let Some(p) = pool {
- base = format!("{}&pool={}", base, urlencoding::encode(p.as_str()));
+ let pool_dp = p.display_path();
+ base = format!("{}&pool={}", base, urlencoding::encode(&pool_dp));
}
base
}
pub(super) fn vote_pool_href(nav: &ThreadNav, pool_item_str: &str) -> String {
+ let display = ItemId::parse(pool_item_str)
+ .map(|i| i.display_path())
+ .unwrap_or_else(|| pool_item_str.to_string());
format!(
"{}/vote?pool={}",
nav.room_path_prefix_for_vote_compare(),
- urlencoding::encode(pool_item_str)
+ urlencoding::encode(&display)
)
}
diff --git a/test/browser_vote_pool.clj b/test/browser_vote_pool.clj
index d51f05db47dc3cb013e56e65f3a1edfbbcbd96ab..23d0bd80b02bd8b1b48853454bed02793296550e 100644
--- a/test/browser_vote_pool.clj
+++ b/test/browser_vote_pool.clj
@@ -1,6 +1,8 @@
(ns test.browser-vote-pool
- "Pool-scoped voting: seed ~/pool/a-j, enter via /vote?pool=~/pool, follow
- the vote → next-pair → vote sequence until no next pair or 15 iterations."
+ "Pool-scoped voting: seed ~/pool/a-j (10 letters), follow the
+ vote → next-pair sequence for all C(10,2)=45 pairs voting the
+ alphabetically-earlier item each time, then assert the garden
+ ranking is a…j in order."
(:require [babashka.fs :as fs]
[cheshire.core :as json]
[clojure.string :as str]
@@ -11,26 +13,38 @@
[test.common :as common]
[test.oauth :as oauth]))
+(def letters ["a" "b" "c" "d" "e" "f" "g" "h" "i" "j"])
+(def total-pairs (/ (* (count letters) (dec (count letters))) 2)) ; C(10,2) = 45
+
(defn- wait-for-text [pg selector expected timeout-ms]
(let [deadline (+ (System/currentTimeMillis) timeout-ms)]
(loop []
- (let [text (locator/text-content (page/locator pg selector))]
+ (let [text (try (locator/text-content (page/locator pg selector)) (catch Exception _ nil))]
(if (and (string? text) (str/includes? text expected))
true
(if (< (System/currentTimeMillis) deadline)
- (do (Thread/sleep 200) (recur))
+ (do (Thread/sleep 150) (recur))
false))))))
(defn- element-text [pg selector]
- (try (locator/text-content (page/locator pg selector)) (catch Exception _ nil)))
+ (try (locator/text-content (page/locator pg selector)) (catch Exception _ "")))
(defn- enc [^String s]
(java.net.URLEncoder/encode s "UTF-8"))
-(def letters ["a" "b" "c" "d" "e" "f" "g" "h" "i" "j"])
+;; Extract the terminal path segment, e.g. "~/pool/c" → "c".
+(defn- leaf [path] (last (str/split path #"/")))
+
+;; Set the hidden ratio inputs so the alphabetically-earlier item wins.
+(defn- set-ratio! [pg left-text right-text]
+ (let [[rl rr] (if (neg? (compare (leaf left-text) (leaf right-text)))
+ [100 0] ; left is earlier → prefer left
+ [0 100])] ; right is earlier → prefer right
+ (page/evaluate pg (str "document.getElementById('vote-ratio-left').value='" rl "'"))
+ (page/evaluate pg (str "document.getElementById('vote-ratio-right').value='" rr "'"))))
(defn vote-pool-flow! []
- (println "\n━━━ browser vote pool (/vote?pool= seeds + follow next-pair sequence) ━━━\n")
+ (println (str "\n━━━ browser vote pool (all " total-pairs " pairs → sorted ranking) ━━━\n"))
(common/letlocals
(bind build (common/run-cargo-build-release! ["slugsocial-server"]))
@@ -54,7 +68,6 @@
(let [alice-token (oauth/fetch-bearer-token! base-url :username "alice")
thread-tag "browser-vote-pool"
- ;; seed ~/pool/a through ~/pool/j as items with bodies
item-lines (str/join "\n"
(map (fn [l] (str "~/pool/" l " {" l "}")) letters))
raw (str "# " thread-tag "\n\n~/pool {root}\n" item-lines "\n")
@@ -77,51 +90,57 @@
(page/navigate pg (str base-url "/login"))
(is (wait-for-text pg "body" "@alice" 15000) "alice session after login")
- ;; Enter via pool URL — page picks first pair automatically.
(page/navigate pg pool-url)
(is (wait-for-text pg "body.view-vote-compare" "compare" 15000)
"pool entry: vote compare page loads")
- ;; Verify the initial pair is within the pool.
- (let [pair-text (element-text pg ".vote-compare-pair")]
- (is (and (string? pair-text) (str/includes? pair-text "~/pool/"))
- (str "initial pair is within ~/pool: " pair-text)))
-
- ;; Follow vote → next-pair sequence up to 15 iterations.
- (let [votes-cast
- (loop [i 0]
- (if (>= i 15)
- i
- (let [explanation (str "pool vote " i " reason")]
- (locator/fill (page/locator pg "#vote-explain") explanation)
- (locator/click (page/locator pg "#vote-compare-form button[type=submit]"))
- ;; Wait for edge history morph confirming the vote landed.
- (if-not (wait-for-text pg "ul.vote-edge-history" explanation 20000)
- (do (println " vote" i "history morph timed out — stopping")
- i)
- (let [has-next (wait-for-text pg "[data-testid=\"vote-next-pair\"]"
- "next pair" 8000)]
- (if-not has-next
- ;; "no next pair" — pool exhausted.
- (do (println " no next pair after vote" i " — pool exhausted")
- (inc i))
- (do
- ;; Verify the pair on this page is within the pool before advancing.
- (let [pt (element-text pg ".vote-compare-pair")]
- (is (and (string? pt) (str/includes? pt "~/pool/"))
- (str "pair at vote " i " is within ~/pool: " pt)))
- (locator/click (page/locator pg "[data-testid=\"vote-next-pair\"]"))
- ;; Wait for next pair to load.
- (wait-for-text pg "body.view-vote-compare" "compare" 10000)
- (recur (inc i)))))))))]
-
- (is (>= votes-cast 1) (str "cast at least 1 vote, got: " votes-cast))
- (println (str " pool voting sequence complete: " votes-cast " vote(s) cast")))
-
- ;; After the sequence, the current page is still a pool-scoped vote page.
- (let [url (page/url pg)]
- (is (str/includes? (or url "") "/vote")
- (str "still on /vote after sequence: " url))))))))
+ ;; Vote all 45 pairs, always preferring the alphabetically-earlier item.
+ (loop [votes-cast 0]
+ (when (< votes-cast total-pairs)
+ (let [left-text (element-text pg ".vote-compare-left code")
+ right-text (element-text pg ".vote-compare-right code")]
+ (is (str/includes? left-text "~/pool/")
+ (str "vote " votes-cast ": left is in pool: " left-text))
+ (is (str/includes? right-text "~/pool/")
+ (str "vote " votes-cast ": right is in pool: " right-text))
+ (set-ratio! pg left-text right-text)
+ (let [winner (if (neg? (compare (leaf left-text) (leaf right-text)))
+ (leaf left-text) (leaf right-text))]
+ (locator/fill (page/locator pg "#vote-explain")
+ (str "prefer " winner)))
+ (locator/click (page/locator pg "#vote-compare-form button[type=submit]"))
+ (is (wait-for-text pg "ul.vote-edge-history" "prefer " 20000)
+ (str "vote " votes-cast " appears in edge history"))
+ (when (< (inc votes-cast) total-pairs)
+ (is (wait-for-text pg "[data-testid=\"vote-next-pair\"]" "next pair" 8000)
+ (str "next pair available after vote " votes-cast))
+ (locator/click (page/locator pg "[data-testid=\"vote-next-pair\"]"))
+ (is (wait-for-text pg "body.view-vote-compare" "compare" 10000)
+ (str "vote page loaded for pair " (inc votes-cast))))
+ (recur (inc votes-cast)))))
+
+ (println (str " cast all " total-pairs " votes"))
+
+ ;; Query the ranking via RPC and assert alphabetical order.
+ (let [rank-resp (oauth/http-post-json
+ (str base-url "/api/v0/rpc")
+ [{"GetGardenRank" {"room" "public"
+ "parent_path" "~/pool"}}]
+ :headers {"Authorization" (str "Bearer " alice-token)})
+ rank-json (json/parse-string (:body rank-resp) true)
+ result (get-in rank-json [:results 0 :result :GardenRank])
+ components (:components result)
+ unranked (:unranked_items result)
+ ranked (mapv :item (mapcat :ranking components))
+ ranked-leaves (mapv #(last (str/split % #"[/~]+")) ranked)]
+ (is (= 1 (count components))
+ (str "all 10 items form one connected component (got " (count components) ")"))
+ (is (empty? unranked)
+ (str "no unranked items (got " (count unranked) ")"))
+ (is (= 10 (count ranked))
+ (str "10 items ranked (got " (count ranked) ")"))
+ (is (= letters ranked-leaves)
+ (str "ranking is alphabetical a→j (got " ranked-leaves ")"))))))))
(finally
(when-some [s @!server] (common/kill-server s))
Hardlinks — judgments / attempts / prompt
judgments
- openai/gpt-chat-latest: A (9:1)
- openai/gpt-5.3-chat: A (9:1)
- openai/gpt-5.2-chat: A (5:1)
- ~anthropic/claude-sonnet-latest: A (8:1)
- ~x-ai/grok-latest: A (5:1)
attempts
- openai/gpt-chat-latest #1
- openai/gpt-5.3-chat #1
- openai/gpt-5.2-chat #1
- ~anthropic/claude-sonnet-latest #1
- ~x-ai/grok-latest #1
Prompt text is loaded only by the download route.