Skip to content

feat(api,ui): showcase workspace-tagged scenario plans (#392)#396

Merged
w7-mgfcode merged 5 commits into
devfrom
feat/showcase-workspace-tagged-plans
Jun 12, 2026
Merged

feat(api,ui): showcase workspace-tagged scenario plans (#392)#396
w7-mgfcode merged 5 commits into
devfrom
feat/showcase-workspace-tagged-plans

Conversation

@w7-mgfcode

Copy link
Copy Markdown
Owner

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 in app/features/demo/pipeline.py; both POST /scenarios save steps use it.
  • Tag taxonomy (locked in the PRP): every pipeline-saved plan carries ["showcase", <kind>, "source:showcase"]; preservation="keep" runs additionally stamp workspace:<workspace_name|workspace_id> (label never empty; no workspace row → no workspace tag).
  • The scenario_simulate_and_save step's data additively echoes the tags list sent.
  • No migration, no schema change, no scenarios production codescenario_plan.tags (JSONB, GIN) and GET /scenarios?tags= containment shipped in PRP-27.

Frontend (feat(ui))

  • parseTagsParam() in frontend/src/lib/url-params.ts (trim/dedupe/cap-20, tested).
  • Planner saved-plans library: clickable tag badges, removable active-filter chips + Clear, server-side filtering via useScenarios(tagFilter), distinct filtered-empty state, and ?tags= URL round-trip (/visualize/planner?tags=workspace:<name> deep-links one workspace's plans).

Tests

  • Unit: _showcase_plan_tags (ephemeral / keep+named / keep+unnamed), updated step-body assertions, keep-run variants for both save steps; parseTagsParam vitest cases.
  • Integration: workspace-tag containment round trip proving the umbrella criterion verbatim (2 tagged plans + control; ?tags=workspace:<label> returns exactly the 2; second tag narrows by AND containment).

Out of scope (per PRP)

  • The agent-HITL plan stays untagged — SaveScenarioRequest carries no tags field; threading workspace context into the agent session is a cross-slice change deferred to a future epic.
  • Tag editing/management UI.

Validation

  • ruff check + ruff format --check + mypy --strict + pyright --strict
  • ✅ Unit: 1966 backend passed; 336 frontend vitest passed; pnpm lint clean
  • ✅ Integration: full -m integration suite green on a fresh DB (268 passed; seeder destructive tests need the pre-existing ALLOW_DESTRUCTIVE_TEST_DB opt-in locally, 16/16 green with it)
  • ✅ Level-4 smoke: showcase_rich keep run → GET /scenarios?tags=workspace:<name> returns exactly the 2 plans with the full tag set
  • ✅ Browser dogfood (Playwright, real Chromium): badge click narrows 3→2 rows server-side, chip + Clear render, URL carries ?tags=, deep link pre-applies the filter in a fresh tab, Clear restores the full list, filtered-empty state distinct from no-plans state

Closes #392

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @w7-mgfcode, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fc639284-ec16-4092-a69b-4b36e6958939

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/showcase-workspace-tagged-plans

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@w7-mgfcode w7-mgfcode merged commit 8a358d6 into dev Jun 12, 2026
8 checks passed
@w7-mgfcode w7-mgfcode deleted the feat/showcase-workspace-tagged-plans branch June 12, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant