Skip to content

presentation: add ASBPresentation foundation#88

Merged
gaelic-ghost merged 6 commits into
mainfrom
feature/presentation-ui-targets
Jun 10, 2026
Merged

presentation: add ASBPresentation foundation#88
gaelic-ghost merged 6 commits into
mainfrom
feature/presentation-ui-targets

Conversation

@gaelic-ghost

@gaelic-ghost gaelic-ghost commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • add framework-neutral ASBPresentation contracts for sidebar, timeline, recent activity, agenda, and dashboard surfaces
  • add focused tests for identity, viewport state, renderer-neutral intents, and renderer-framework import boundaries
  • expose read-only recent file/command order hints so mixed activity rails can preserve chronology

Verification

  • swift build
  • swift test
  • bash scripts/repo-maintenance/validate-all.sh
  • git diff --check

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced modular UI framework support: ASBPresentation provides renderer-neutral data models, while ASBAppKit and ASBSwiftUI enable platform-specific implementations.
    • Added presentation models for key flows: thread sidebar, turn timeline, agenda/dashboard, and recent activity.
  • Tests

    • Added comprehensive test coverage for new presentation modules and boundary validation.
  • Chores

    • Restructured package to support multiple UI targets with explicit dependencies.

@gaelic-ghost gaelic-ghost added the enhancement New feature or request label Jun 10, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: da2552b2-14f2-4e6f-8583-ed69970cd2a1

📥 Commits

Reviewing files that changed from the base of the PR and between 0c1af2f and 6fee92f.

📒 Files selected for processing (18)
  • Package.swift
  • ROADMAP.md
  • Sources/ASBAppKit/ASBAppKitModule.swift
  • Sources/ASBPresentation/AgendaDashboardPresentation.swift
  • Sources/ASBPresentation/RecentActivityPresentation.swift
  • Sources/ASBPresentation/ThreadSidebarPresentation.swift
  • Sources/ASBPresentation/TurnTimelinePresentation.swift
  • Sources/ASBSwiftUI/ASBSwiftUIModule.swift
  • Sources/SwiftASB/Public/CodexThread+RecentCommands.swift
  • Sources/SwiftASB/Public/CodexThread+RecentFiles.swift
  • Tests/ASBAppKitTests/ASBAppKitModuleTests.swift
  • Tests/ASBPresentationTests/ASBPresentationBoundaryTests.swift
  • Tests/ASBPresentationTests/AgendaDashboardPresentationTests.swift
  • Tests/ASBPresentationTests/RecentActivityPresentationTests.swift
  • Tests/ASBPresentationTests/ThreadSidebarPresentationTests.swift
  • Tests/ASBPresentationTests/TurnTimelinePresentationTests.swift
  • Tests/ASBSwiftUITests/ASBSwiftUIModuleTests.swift
  • docs/maintainers/presentation-ui-targets-plan.md

📝 Walkthrough

Walkthrough

This PR establishes a modular foundation for SwiftASB UI rendering by introducing three new Swift package targets (ASBPresentation, ASBAppKit, ASBSwiftUI) with framework-neutral presentation models, updated package wiring, and comprehensive validation tests covering thread sidebar, turn timeline, recent activity, and agenda/dashboard surfaces.

Changes

Modular Presentation and UI Target Foundation

Layer / File(s) Summary
Package structure and module scaffolds
Package.swift, ROADMAP.md, Sources/ASBAppKit/ASBAppKitModule.swift, Sources/ASBSwiftUI/ASBSwiftUIModule.swift, Sources/SwiftASB/Public/CodexThread+RecentCommands.swift, Sources/SwiftASB/Public/CodexThread+RecentFiles.swift, Tests/ASBAppKitTests/ASBAppKitModuleTests.swift, Tests/ASBSwiftUITests/ASBSwiftUIModuleTests.swift
Package.swift declares three library products and targets with chained dependencies; ROADMAP.md updates to hybrid UI strategy; ASBAppKit and ASBSwiftUI module definitions added; ordering/timing fields on RecentCommands/RecentFiles snapshots exposed with public internal(set) access; module tests verify scaffold availability.
Thread sidebar presentation models and tests
Sources/ASBPresentation/ThreadSidebarPresentation.swift, Tests/ASBPresentationTests/ThreadSidebarPresentationTests.swift
ThreadSidebarSnapshot aggregates sections and selection state with @MainActor initialization from library data; ThreadSidebarSection/ThreadSidebarItem model grouping and row display with badges, activity status, and metadata; ThreadSelectionState tracks selection, ThreadSidebarSourceBadge/ThreadSidebarActivityStatus provide renderer-neutral status mapping; tests validate identity stability, section/item composition, and selection logic.
Turn timeline presentation models and tests
Sources/ASBPresentation/TurnTimelinePresentation.swift, Tests/ASBPresentationTests/TurnTimelinePresentationTests.swift
TurnTimelineSnapshot composes turn sections and viewport state with @MainActor initialization from recentTurns and minimap data; TurnTimelineSection/TurnTimelineItem model turn-level and row-level structures with payload completeness flags; TurnTimelineViewportState and ScrollActivityPhase capture scroll state; token summary and item kind mapping provided; tests verify snapshot flattening, payload hydration, and intent behavior.
Recent activity presentation models and tests
Sources/ASBPresentation/RecentActivityPresentation.swift, Tests/ASBPresentationTests/RecentActivityPresentationTests.swift
RecentActivitySnapshot merges optional recent files and commands into a unified sorted item list with @MainActor initialization; RecentActivityItem models command/file rows with status, payload, and ordering fields; status mapping enums provided; @MainActor initializer applies multi-key sorting by turnStartedAt/turnOrderIndex/itemOrderIndex/id; tests validate identity prefixing, payload residency, and intent cases.
Agenda and dashboard presentation models and tests
Sources/ASBPresentation/AgendaDashboardPresentation.swift, Tests/ASBPresentationTests/AgendaDashboardPresentationTests.swift
AgendaSnapshot models goal/plan state with status enums; AgendaPlan/AgendaProposedPlan/AgendaStep/AgendaProposedItem snapshots provide nested structure mapping; DashboardSnapshot captures thread metadata, tool/MCP/auto-review statuses, diagnostic description, hook runs, and active calls via @MainActor initialization from CodexThread.Dashboard; status enums and intent types defined for goal control and approval/elicitation responses; tests validate data projection and intent payloads.
Presentation layer validation and architecture documentation
Tests/ASBPresentationTests/ASBPresentationBoundaryTests.swift, docs/maintainers/presentation-ui-targets-plan.md
ASBPresentationBoundaryTests scans all files in Sources/ASBPresentation and enforces that none import AppKit or SwiftUI; maintainers plan document defines modular architecture (presentation/AppKit/SwiftUI separation), target responsibilities, data contracts for four UI surfaces with inputs/snapshots/intents, implementation slices, validation commands, and open questions on snapshot ownership, dependency boundaries, view technology, and styling.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • gaelic-ghost/SwiftASB#72: Main PR adds new presentation models (e.g., ThreadSidebarPresentation/ThreadSidebarSourceBadge) that map CodexAppServer.ThreadSource and project identity metadata, which retrieved PR #72 explicitly restructures/exposes in SwiftASB (ThreadInfo.source, CodexWorkspace.ProjectInfo, and library thread snapshots).

Poem

A rabbit hops through modular dreams,
Where targets split in clean-drawn seams—
ASBPresentation, untethered and free,
Speaks snapshots pure, without UI plea! 🐰✨
Sidebar, timeline, and dashboard aligned,
Framework-neutral magic, beautifully designed!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'presentation: add ASBPresentation foundation' accurately and concisely summarizes the main change—introducing the ASBPresentation module as a foundation layer with framework-neutral UI contracts.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/presentation-ui-targets

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.

@gaelic-ghost gaelic-ghost merged commit 6891e19 into main Jun 10, 2026
1 of 2 checks passed
@gaelic-ghost gaelic-ghost deleted the feature/presentation-ui-targets branch June 10, 2026 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant