Repository navigation
refactor(web-gen-api-axum): extract start-axum-ui crate (dark_mode + app) - #12617
Merged
Merged
Conversation
…app) Step 2 of the pkgs/web-gen-api-axum crate split (#8965), following the step-1 pattern from #8967 / PR #12395. Pure code motion, no behavior change: - New member crate pkgs/start-axum-ui owns src/app.rs and src/dark_mode.rs (moved verbatim except app.rs now imports AppError/ErrorTemplate from start_axum_error instead of crate::error_template). It depends on start-axum-error and mirrors the facade's hydrate/ssr feature wiring for the moved code. - Facade src/app.rs and src/dark_mode.rs are now re-export shims (pub use start_axum_ui::app::* / dark_mode::*), keeping start_axum::app and start_axum::dark_mode paths working for lib.rs, main.rs and fileserv.rs, exactly as step 1 did for error_template. - Facade Cargo.toml gains the start-axum-ui path dependency and forwards hydrate/ssr to it; Cargo.lock updated to match. Closes #8968
…ing the step-1 shim
The leptos #[server] macro expansion references serde by name in the invoking crate; the facade had it as a direct dep, so the extracted crate must too (E0463 in the step-2 gate run). Same spec as the facade: 1.0.176 with derive.
…xum-error The leptos #[component] macro expands through leptos_dom::tracing:: instrument, which requires tracing as a direct dependency of the invoking crate in both hydrate and ssr modes (E0433 in the step-2 gate run). This is the same wiring step 1 recorded for start-axum-error: tracing optional, dep:tracing in both features.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 22 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Nov 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Step 2 of the pkgs/web-gen-api-axum crate split (#8965), mirroring the step-1 pattern from #8967 / PR #12395:
Pure code motion, no behavior change: the facade re-exports keep
start_axum::appandstart_axum::dark_modeworking for the known consumers (facade lib.rs hydrate fn, main.rs, fileserv.rscrate::app::App). The visitor server fns in app.rs (AddVisitorData,GetVisitorRows) moved with app as one unit, per the step scope. Facade shim file modes kept at 100755, matching the step-1 shim.Closes #8968.
Evidence
Oracle = the step-1 gate, run via fleet-run in the repo's
nix develop .#fleetshell (all runs check out the target ref of developing-today/code):8f47a87), run 45038657750: all gates green —cargo check --features ssr,cargo check --locked --features hydrate,cargo check --locked --features ssr,cargo test --locked --features ssr(0 tests; project baseline per step 0).can't find crate for serde: the leptos#[server]macro expansion referencesserdeby name in the invoking crate. Fixed by giving start-axum-ui the facade's own serde spec (1.0.176 + derive) as a direct dependency.cannot find tracing: the#[component]macro expands throughleptos_dom::tracing::instrument— the same wiring step 1 recorded for start-axum-error. Fixed the same way:tracingoptional,dep:tracingin both hydrate and ssr.--lockedgates passing against the committed lock, plus the runner-printedstart-axum-uilock entry matching the committed one byte for byte, prove the lock update is canonical.git show <main>:pkgs/web-gen-api-axum/src/app.rs | diff - pkgs/start-axum-ui/src/app.rsshows exactly one changed line (thecrate::error_template→start_axum_errorimport); dark_mode.rs is byte-identical.App,DarkModeToggle,toggle_dark_mode,add_visitor,get_visitor_rowsare defined only underpkgs/start-axum-ui/src/; the facade files hold only the re-exports.Merge Danger
Door: Two-way; the extraction and feature wiring can be reverted.
Blast Radius: Low; limited to the web-gen-api-axum app/dark_mode modules and their new crate. Step 3 (#8969, facade slimming) builds on this and is untouched.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.