feat(server): wire wizard.* and deckjobs.* JSON-RPC dispatcher arms #52
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_mik"
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?
Bucket A of #51 — 9 of 15 undispatched OpenRPC methods.
Summary
Adds 9 dispatch arms to the JSON-RPC dispatcher in
crates/hero_slides_server/src/rpc.rs:wizard.runAsynccrate::generate_job::handle_wizard_run_async(existed since the wizard work landed; was orphaned at line 1127)wizard.runJobStatuscrate::generate_job::handle_wizard_run_job_status(line 1590)wizard.runJobLogscrate::generate_job::handle_wizard_run_job_logs(line 1602)wizard.runResultcrate::generate_job::handle_wizard_run_result(line 1693)deckjobs.listcrate::jobs::rpc::handle_list(line 46)deckjobs.statuscrate::jobs::rpc::handle_status(line 68)deckjobs.logscrate::jobs::rpc::handle_logs(line 75)deckjobs.cancelcrate::jobs::rpc::handle_cancel(line 86)deckjobs.resultcrate::jobs::rpc::handle_result(line 102)Every one of these handlers already existed and was reachable from the JobManager — they just had no
matcharm in the dispatch table, so calls returned-32000 "Method not found"and the JS dashboard's Slide Wizard CTA + per-deck Jobs sidebar silently failed (each call wrapped intry{…}catch{toast(…)}).Also drops the
#[allow(unused_imports)]decorations on thepub use {JobHandle, JobManager, types::*}re-exports injobs/mod.rs. The inline comment explicitly said they "become load-bearing when RPC handlers are wired in A.5 / A.6" — that's this commit.Verification
cargo check -p hero_slides_serverclean (no new warnings — the 11 existing warnings are unrelatedlegacy_param_shimhelpers from PR #50 reserved for future buckets).scripts/smoke_openrpc.pypost-merge: METHOD_MISSING count expected to drop from 15 → 6 (only bucket B/C methods left).wizard.runAsyncreturns{key, job_id}instead of -32000).deckjobs.listreturns[JobSnapshot]).deckjobs.cancel/deckjobs.logs).Out of scope
Bucket B (
slide.clearLink,slide.setImageModel,slide.revertToLastGenerated,slide.resolveContext,bg.extractTheme) — pure wire-up against existing lib helpers; sibling PR.Bucket C (
slide.setLink,slide.getStaleness,deck.staleness,folder.pick) — blocked on missing lib code (link persistence design, staleness computation, file-dialog crate); fresh issue at session end.Signed-off-by: mik-tf
Adds 9 dispatch arms in `crates/hero_slides_server/src/rpc.rs`: wizard.runAsync → handle_wizard_run_async wizard.runJobStatus → handle_wizard_run_job_status wizard.runJobLogs → handle_wizard_run_job_logs wizard.runResult → handle_wizard_run_result deckjobs.list → jobs::rpc::handle_list deckjobs.status → jobs::rpc::handle_status deckjobs.logs → jobs::rpc::handle_logs deckjobs.cancel → jobs::rpc::handle_cancel deckjobs.result → jobs::rpc::handle_result Every handler already existed in the codebase — wizard.* in generate_job.rs (lines 1127, 1590, 1602, 1693), deckjobs.* in jobs/rpc.rs (lines 46, 68, 75, 86, 102) — but no dispatch arm pointed at them, so calls returned -32000 "Method not found" and the JS dashboard's Slide Wizard CTA + per-deck Jobs sidebar silently failed. Also drops the `#[allow(unused_imports)]` decorations on the `pub use {JobHandle, JobManager, types::*}` re-exports in jobs/mod.rs — the inline comment explicitly said they "become load-bearing when RPC handlers are wired in A.5 / A.6", which is what this commit does. Bucket A of #51 (9 of 15 undispatched methods). Bucket B (slide.* + bg.extractTheme) follows in a sibling PR; bucket C (slide.setLink, slide.getStaleness, deck.staleness, folder.pick — blocked on lib stubs) gets a fresh issue. Signed-off-by: mik-tf