refactor(web): move the skin pages into a skin module (BUNYIP-501) #503
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/BUNYIP-501-skin-module"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
B3 of the BUNYIP-459 epic, part 2: relocate the skin content into a
skinmodule, completing the framework / skin separation started by part 1.What
The per-app marketing / legal / docs / landing pages now live in
bunyip-web/src/skin/, separate from the framework (layout scaffolding, ui, web-edge, and the auth / dashboard / admin handlers that B4 will extract into a shared crate). The framework tree no longer holds this app's page copy or docs.Changes
bunyip-web/src/skin/module:public.rs(landing + 404),content.rs(pricing, our-story, roadmap, terms, privacy, docs, feedback), anddocs/*.md. Moved wholesale withgit mv, so the handler code itself is unchanged.handlers/mod.rsdrops thecontent/publicdeclarations;handlers/now holds only framework handlers (auth, dashboard, admin, health, onboarding, consent).main.rsgainsmod skinand re-sourcescontent/publicfromskin::, so the route table is unchanged. The two cross-module references (skin::content::trial_phrasefromskin::public,skin::public::not_found_contentfromskin::content) and the docsinclude_str!paths (../docs/->docs/, sincedocs/moved underskin/) are updated.Byte-identical
Pure module re-homing: handler code, rendered output, and routes are unchanged, and the 211 bunyip-web tests pass. Only module paths moved.
Scope note
feedbackand the per-applicationapp_docshandlers are generic capabilities that happen to live incontent.rs; they moved with it rather than being surgically split out. If B4 wants them in the shared framework crate they can be split then; leaving them in the skin for now keeps this change a safe wholesale move. Brand image assets (bunyip-hero.png,mokosh-logo.png) stay physically underassets/(served at/assets/*), since relocating them would change public URLs; they are conceptually skin-owned and can move when the skin gets its own served asset dir.Completes B3 (with part 1)
Part 1 (#502) made the framework chrome read the brand from config; this move puts the skin page bodies and docs in their own module. Together they satisfy BUNYIP-501: the framework carries no bunyip marketing copy, and the skin content is a separable unit.
Stacked
On B3 part 1 (#502) -> B2 (#501) -> merged B1. Base =
feat/BUNYIP-501-debrand-chrome.Validation
cargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warnings, andcargo test -p bunyip-webare green.B5 of the theme-agnostic web-kit epic. A skin with different third-party integrations extends bunyip-web's Content-Security-Policy without editing security.rs. Config.csp: CspConfig { connect_src, form_action } is populated from CSP_CONNECT_SRC / CSP_FORM_ACTION (comma-separated) and mirrors dunite-core's CspConfig shape. security.rs::policy() appends the skin's hosts to connect-src and form-action only; the script-src 'self' / default-src / frame-ancestors lockdown (BUNYIP-424) is never extended by config. A new test asserts the skin hosts land in connect-src / form-action and never leak into script-src / default-src / img-src, and another pins that an empty config is byte-identical to the previous policy. .env.example documents the two variables. bunyip-web is a standalone binary with no dunite-core dependency, so the CspConfig shape is mirrored locally rather than pulling in the dependency and rewriting the bespoke policy builder; B4 (the web-kit crate) is where the web-edge security module unifies with dunite-core's CspConfig. Empty config yields the byte-identical default policy; the 213 bunyip-web tests pass. Stacked on #503. #BUNYIP-503 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>