Skip to content

feat(native): wire timeline, transcript, and composer THEME_CSS_HOOKS slots - #468

Merged
rynfar merged 1 commit into
nativefrom
feat/native-theme-slots-timeline-composer
Nov 20, 2026
Merged

rynfar merged 1 commit into
nativefrom
feat/native-theme-slots-timeline-composer

Conversation

@rynfar

@rynfar rynfar commented Nov 20, 2026

Copy link
Copy Markdown
Owner

Part of #457 (Wave H4B Part 2).

Summary

Wires the 10 timeline, transcript, and composer THEME_CSS_HOOKS slots in apps/native using the ThemeSlot engine landed in #467 (12f65f0f2f), with zero duplicate .hover(...)/.active(...) registrations and properly clipped behind-content theme_slot_background_layer rendering:

  • apps/native/crates/app/src/thread_view.rs:
    • Wires ThemeSlot::MessagesTimelineScroll + theme_slot_background_layer(ThemeSlot::MessagesTimelineScroll, cx) onto the timeline scroll container (including loading and empty states).
    • Wires .theme_slot_timeline_row(kind, cx) (with all 17 RowKind variants mapped to web's exact data-timeline-row-kind strings: "message", "work", "work-live", "work-toggle", "thinking", "working", "viewed-images", "turn-fold", "attempt-fold", "context-compaction", "assistant-meta", "event", "proposed-plan", "worktree-setup", "html-render", "sent-message", "mcp-app").
    • Tracks theme_revision in TranscriptTypography so live theme/CSS slot changes immediately remeasure virtualized timeline rows.
  • apps/native/crates/app/src/transcript/messages.rs:
    • Wires ThemeSlot::UserMessageRow onto user message rows (standard, workflow, and attribution rows).
    • Wires ThemeSlot::UserMessageBubble + theme_slot_background_layer(ThemeSlot::UserMessageBubble, cx) onto user message bubbles and collapsible attribution header bubbles (preserving .relative().overflow_hidden() and syncing collapsed fade surface with solid overrides).
    • Wires ThemeSlot::AssistantMessageRow onto assistant message rows.
  • apps/native/crates/app/src/transcript/markdown.rs & apps/native/crates/app/src/transcript/markdown/blocks.rs:
    • Wires ThemeSlot::ChatMarkdown onto assistant markdown prose(...) containers.
    • Wires ThemeSlot::ChatMarkdownCodeblock onto TextViewStyle::code_block in markdown::style(cx) (making inner background transparent when a scoped var(--theme-background-image) wallpaper is active) and pairs it with theme_slot_background_layer(ThemeSlot::ChatMarkdownCodeblock, cx), matched corner radii, display: none, and hover/active refinements on render_code_block cards in blocks.rs.
  • apps/native/crates/app/src/composer/view.rs:
    • Wires ThemeSlot::ChatComposerForm onto the outer composer form container.
    • Wires ThemeSlot::ComposerHost + theme_slot_background_layer(ThemeSlot::ComposerHost, cx) onto composer-card, suppressing the glass backdrop's opaque fill/outline when the slot explicitly overrides background/border so custom colors, gradients, borders, and scoped wallpapers show through cleanly.
    • Wires ThemeSlot::ComposerTiptap onto the Editor prompt container (with optional hover/background wrapper only when defined).

Tests

  • thread_view::tests::timeline_row_kind_matches_web_data_attributes
  • thread_view::tests::thread_view_renders_all_timeline_and_transcript_theme_css_slots_cleanly (--features snapshot)
  • transcript::markdown::context_tests::markdown_prose_and_codeblock_apply_theme_css_slot_overrides_cleanly
  • composer::view::tests::composer_renders_theme_css_slots_and_background_image_cleanly
  • Extended TranscriptTypography remeasure coverage for theme_revision invalidation.

Verification

All 10 verification gates passed (vp fmt, gen-theme --check, conformance/generate --check, sync.test.ts 47/47, cargo clippy --workspace --all-targets -- -D warnings, t3-core 1,894+8, t3-client 169+4 rerun of mcp_apps::tests, t3-native 235/235, targeted --features snapshot thread_view::/transcript::/composer:: 107+14=121/121, and cargo build -p t3-native).

Built with Antigravity.

@rynfar
rynfar merged commit f48f5ee into native Nov 20, 2026
2 checks passed
@rynfar
rynfar deleted the feat/native-theme-slots-timeline-composer branch November 20, 2026 10:51
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