fix(slides): propagate design system CSS vars to all preview surfaces
Summary
Applying a design system to an existing deck was O(n) in tool calls. The agent had to read, rewrite, and update each slide individually. On a modest deck this produced 25+ tool calls. This PR reduces retroactive application to O(1).
Problem
Skill templates contained hardcoded color and font values baked into
slide HTML. SlideRenderer already injected CSS custom properties at
render time, but the hardcoded values bypassed the cascade, forcing
the agent to rewrite each slide's content when a design system was
applied or changed.
When a design system was applied retroactively to an existing deck,
sidebar thumbnails and browse-card previews continued to render with
default tokens — designSystem was never forwarded to EditorSidebar
or DeckCard.
Solution
Replace all hardcoded values in skill templates with var(--ds-*)
references so new slides are token-aware from creation. Retroactive
application becomes a single call — SlideRenderer handles the rest
via CSS cascade.
Thread designSystem through to all three render surfaces so the
main editor, sidebar thumbnails, and browse cards stay consistent.
Fallback mirrors useDeckDesignSystem DEFAULT_DESIGN_SYSTEM
behaviour at each call site.
Key Changes
create-deck/SKILL.md,slide-editing/SKILL.md— replace hardcoded hex/font values withvar(--ds-*)tokensdesign-systems/SKILL.md— add retroactive application guidanceSlideRenderer.tsx— add--ds-heading-weightand--ds-body-weightto CSS var injection blockEditorSidebar.tsx,DeckEditor.tsx— threaddesignSystemprop through to<SlideRenderer>Index.tsx,DeckCard.tsx— builddesignSystemByIdmap and threaddesignSystemthrough to<SlideRenderer>
Known limitation
The current implementation stores share links as self-contained copies — duplicating title,
slides, and aspect ratio rather than referencing the live deck. This change follows that pattern
by persisting design_system_id into the share link at creation time rather than joining back to
decks at read time. Schema changes were required because SharedPresentation loads entirely
from deck_share_links, so without the column, there was no design system ID to pass into
useDeckDesignSystem.
Share links created before this change have design_system_id = NULL and continue to render
with default branding — no regression. New shares of existing decks capture the current
designSystemId at creation time. A backfill migration for already-published share links is
scoped as a follow-up.
Deploy request for agent-native-scheduling pending review.
Visit the deploys page to approve it
| Name | Link |
|---|---|
| Latest commit | 00bc1115dfb7f78d8fef5649a6f29c5168b68dc2 |
Deploy request for agent-native-brain pending review.
Visit the deploys page to approve it
| Name | Link |
|---|---|
| Latest commit | 00bc1115dfb7f78d8fef5649a6f29c5168b68dc2 |
Deploy request for agent-native-design pending review.
Visit the deploys page to approve it
| Name | Link |
|---|---|
| Latest commit | 00bc1115dfb7f78d8fef5649a6f29c5168b68dc2 |
Deploy request for agent-native-voice pending review.
Visit the deploys page to approve it
| Name | Link |
|---|---|
| Latest commit | 00bc1115dfb7f78d8fef5649a6f29c5168b68dc2 |
Deploy request for agent-native-meeting-notes pending review.
Visit the deploys page to approve it
| Name | Link |
|---|---|
| Latest commit | 00bc1115dfb7f78d8fef5649a6f29c5168b68dc2 |
Deploy request for agent-native-images pending review.
Visit the deploys page to approve it
| Name | Link |
|---|---|
| Latest commit | 00bc1115dfb7f78d8fef5649a6f29c5168b68dc2 |
@Abdul-M01 this PR is great - just one piece of feedback above to get it in
Visual recap — skipped
The visual recap job did not run for this pull request. This is informational only and does not block the PR.
Recap skipped for 00bc111: external fork PR requires a maintainer to apply the recap label to the current head SHA.
we just merged a big localization PR that created some conflicts, if you can resolve @Abdul-M01 and check if any of the other automated feedback looks worth fixing would love to get this in