feat(api,ui): showcase workspace-tagged scenario plans (#392)#396
Conversation
There was a problem hiding this comment.
Sorry @w7-mgfcode, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Summary
Implements showcase-workspace E3 (#392, umbrella #389): the two scenario plans the showcase pipeline saves gain workspace-aware tags, and the What-If Planner's saved-plans library gains a deep-linkable tag filter.
Backend (
feat(api))DemoContext.workspace_name+ pure_showcase_plan_tags()helper inapp/features/demo/pipeline.py; bothPOST /scenariossave steps use it.["showcase", <kind>, "source:showcase"];preservation="keep"runs additionally stampworkspace:<workspace_name|workspace_id>(label never empty; no workspace row → no workspace tag).scenario_simulate_and_savestep'sdataadditively echoes thetagslist sent.scenario_plan.tags(JSONB, GIN) andGET /scenarios?tags=containment shipped in PRP-27.Frontend (
feat(ui))parseTagsParam()infrontend/src/lib/url-params.ts(trim/dedupe/cap-20, tested).useScenarios(tagFilter), distinct filtered-empty state, and?tags=URL round-trip (/visualize/planner?tags=workspace:<name>deep-links one workspace's plans).Tests
_showcase_plan_tags(ephemeral / keep+named / keep+unnamed), updated step-body assertions, keep-run variants for both save steps;parseTagsParamvitest cases.?tags=workspace:<label>returns exactly the 2; second tag narrows by AND containment).Out of scope (per PRP)
SaveScenarioRequestcarries notagsfield; threading workspace context into the agent session is a cross-slice change deferred to a future epic.Validation
ruff check+ruff format --check+mypy --strict+pyright --strictpnpm lintclean-m integrationsuite green on a fresh DB (268 passed; seeder destructive tests need the pre-existingALLOW_DESTRUCTIVE_TEST_DBopt-in locally, 16/16 green with it)showcase_richkeep run →GET /scenarios?tags=workspace:<name>returns exactly the 2 plans with the full tag set?tags=, deep link pre-applies the filter in a fresh tab, Clear restores the full list, filtered-empty state distinct from no-plans stateCloses #392