Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
dde47b9
Add CSS and Asset Pipeline Documentation
crimson-knight Jul 30, 2025
31cff14
Phase 1: Add @layer structure, custom properties, full-class-name sel…
crimson-knight Feb 15, 2026
4701db2
Phase 2: oklch colors, WCAG accessibility utilities and modifiers
crimson-knight Feb 15, 2026
b5d72a5
Phase 3: Container queries, logical properties, P1 variants and utili…
crimson-knight Feb 15, 2026
95374af
Phase 4: Component CSS layer with registration macro and layer priority
crimson-knight Feb 15, 2026
c8c5a80
Fix 9 failing tests across CacheWarmer, HTML elements, integration, a…
crimson-knight Feb 15, 2026
72ca043
Add cross-platform UI view layer with native platform renderers and F…
crimson-knight Feb 18, 2026
6a44c3c
Add objc_bridge.m and document cross-platform build requirements
crimson-knight Mar 3, 2026
567af54
Update platform-renderers skill with build prerequisites
crimson-knight Mar 3, 2026
cf941e4
[Docs] Add testing guide for test_id property and cross-platform UI t…
crimson-knight Mar 4, 2026
3f79954
feat: Amber brand system + design-critic agent + HIG validation infra…
crimson-knight Apr 15, 2026
db1ce1f
feat: cross-platform UI renderers, scenes, views, bridges, and host d…
crimson-knight Apr 15, 2026
0dd021f
chore: HIG validation captures, backdrops, reports, component docs, r…
crimson-knight Apr 15, 2026
df3ab17
docs: require checkpoint commit after each slug passes design-critic
crimson-knight Apr 15, 2026
43ff95a
build: codesign macos host binary with Developer ID for persistent TCC
crimson-knight Apr 15, 2026
baa921d
build: drop hardened runtime from macos host codesign
crimson-knight Apr 15, 2026
660a457
fix: glass bleed-through + iOS destructive contrast
crimson-knight Apr 15, 2026
7dd1aa5
feat(action-sheets): pass design-critic at iteration 7 — PASS_WITH_NOTES
crimson-knight Apr 15, 2026
7f41918
feat(activity-views): pass design-critic at iteration 24 — PASS_WITH_…
crimson-knight Apr 15, 2026
2a5b903
fix(showcase): strip renderer-internal debug labels from focal views
crimson-knight Apr 15, 2026
146e205
fix(showcase): replace remaining designer-annotation labels with user…
crimson-knight Apr 15, 2026
f209b78
fix(showcase): pin InboxScene column widths so 3-pane layout renders …
crimson-knight Apr 15, 2026
126173f
fix(showcase): short noun labels for segmented-controls + add batch_p…
crimson-knight Apr 15, 2026
b080628
feat(hig): isolation-plate taste pass + UIKit renderer fixes
crimson-knight Apr 15, 2026
e61d66d
refactor(ios): simplify centered_isolation_plate; document card-stret…
crimson-knight Apr 15, 2026
0b543db
feat(ui): UI::Label#preferred_max_layout_width for iOS card wrapping
crimson-knight Apr 16, 2026
f7257ae
feat(hig): batch-promote 12 clean slugs + Codex UI::Card restructure
crimson-knight Apr 16, 2026
db829d2
feat(validation): sync worklist state from evidence audits
crimson-knight Apr 16, 2026
e593c7e
chore(validation): resync evidence manifests and worklist
crimson-knight Apr 16, 2026
6f67a5c
feat(ui): add context menu and path control primitives
crimson-knight Apr 16, 2026
b86e2df
feat(hig): refresh context-menu and path-control previews
crimson-knight Apr 16, 2026
7212eea
feat(ui): add native web map and video surfaces
crimson-knight Apr 16, 2026
d1ffba6
feat(hig): refresh web-view previews and evidence
crimson-knight Apr 16, 2026
58d914c
chore(validation): update web-view backlog notes
crimson-knight Apr 16, 2026
fa8e95e
feat(ui): add web navigation hooks and native share presentation
crimson-knight Apr 16, 2026
bfb0f01
feat(hig): add maps and video validation studies
crimson-knight Apr 16, 2026
1f186de
chore(validation): record maps and video evidence
crimson-knight Apr 16, 2026
c24013f
fix(hig): restore card gutters for maps and video studies
crimson-knight Apr 16, 2026
1fb5f11
chore(validation): refresh maps and video framing evidence
crimson-knight Apr 16, 2026
84793dc
fix(hig): isolate search toolbar and tab studies
crimson-knight Apr 16, 2026
225c1e5
chore(validation): regrade promoted HIG studies
crimson-knight Apr 16, 2026
09523d8
fix(hig): tighten iOS and macOS study framing
crimson-knight Apr 16, 2026
ccef533
chore(validation): refresh evidence for study framing batch
crimson-knight Apr 16, 2026
441e976
chore(validation): repair ledger drift for current studies
crimson-knight Apr 16, 2026
82026f6
feat(ui): add outline view fallback primitive
crimson-knight Apr 16, 2026
2f54c22
fix(hig): tighten study framing and resync validation
crimson-knight Apr 16, 2026
20d1b16
chore(validation): correct app-shortcuts backlog state
crimson-knight Apr 16, 2026
b683782
fix(ios-hig): harden simulator preflight and retry recovery
crimson-knight Apr 16, 2026
804c6a4
fix(hig): refine path and outline host studies
crimson-knight Apr 16, 2026
d840f9d
chore(validation): promote path and outline studies
crimson-knight Apr 16, 2026
50aa816
fix(hig): tighten page control and navigation studies
crimson-knight Apr 16, 2026
2a99252
chore(validation): promote page sidebar and split studies
crimson-knight Apr 16, 2026
0505fb6
feat(ui): add column-view primitive and refine content studies
crimson-knight Apr 16, 2026
fc6b038
chore(validation): promote content studies and sync column views
crimson-knight Apr 16, 2026
551d236
feat(ui): add token fields and column browser studies
crimson-knight Apr 16, 2026
47c3a1d
chore(validation): promote column and segmented studies
crimson-knight Apr 16, 2026
89d6a8d
feat(ui): add image well primitive and refine token field studies
crimson-knight Apr 17, 2026
4d30ddd
chore(validation): promote token fields and sync image wells
crimson-knight Apr 17, 2026
1840ca8
feat(ui): add gauge primitive and image well studies
crimson-knight Apr 17, 2026
4d497be
chore(validation): promote image wells and sync gauges
crimson-knight Apr 17, 2026
e5860fd
feat(ui): add activity ring primitive and native ring rendering
crimson-knight Apr 17, 2026
9bcdb96
chore(validation): promote gauges and refresh ring notes
crimson-knight Apr 17, 2026
074ab5a
feat(ui): add activity rings primitive and native host rendering
crimson-knight Apr 17, 2026
baaef71
chore(validation): promote activity rings and sync evidence
crimson-knight Apr 17, 2026
c176f6e
fix(hig): tighten macos menu study framing
crimson-knight Apr 17, 2026
ac348be
feat(ui): add panel primitive and tighten control studies
crimson-knight Apr 17, 2026
d64970e
chore(validation): promote panels and refresh control evidence
crimson-knight Apr 17, 2026
04e2daa
fix(hig): finish remaining auditable study polish
crimson-knight Apr 17, 2026
49dd094
feat(ui): add native local notification bridge
crimson-knight Apr 17, 2026
30a95ce
feat(shell): add menu bar and status item models
crimson-knight Apr 17, 2026
443cdae
feat(ui): add windows configuration service
crimson-knight Apr 17, 2026
92c36f6
feat(shell): wire native menu bar and window services
crimson-knight Apr 17, 2026
9d9d48a
feat(shell): add shortcut and quick action exports
crimson-knight Apr 17, 2026
52804c1
chore(validation): clear stale evidence and classify extension surfaces
crimson-knight Apr 17, 2026
c9fe9e9
feat(shell): add widget and live activity metadata exports
crimson-knight Apr 17, 2026
e96ed05
feat(shell): export widgetkit and activitykit scaffolds
crimson-knight Apr 17, 2026
de49a03
feat(shell): add shortcut and notification export scaffolds
crimson-knight Apr 17, 2026
01d7754
docs: refresh native apple project overview
crimson-knight Apr 17, 2026
f2966e7
docs(validation): publish an easy dashboard entrypoint
crimson-knight Apr 17, 2026
15588ab
docs(android): add material execution handoff plan
crimson-knight Apr 17, 2026
877b1f3
feat(android-host): scaffold showcase and screenshot capture
crimson-knight Apr 18, 2026
bc7285b
feat(android): replace material placeholder surfaces
crimson-knight Apr 18, 2026
8b12ac1
feat(android-host): wire renderer-backed material showcase
crimson-knight Apr 18, 2026
25c960e
chore(android-validation): add first-batch evidence manifests
crimson-knight Apr 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
836 changes: 836 additions & 0 deletions .claude/agents/apple-platform-designer/agent.md

Large diffs are not rendered by default.

120 changes: 120 additions & 0 deletions .claude/agents/component-reviewer/agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
---
name: component-reviewer
description: Reviews Crystal cross-platform component code for compatibility across all target platforms
model: sonnet
tools:
- Read
- Glob
- Grep
---

# Component Reviewer Agent

You review Crystal cross-platform UI component code in the `asset_pipeline` shard for correctness, compatibility, and adherence to the architecture plan. You do not modify files -- you report findings that the developer must address.

## Repository Context

- **Shard root:** `/Users/crimsonknight/open_source_coding_projects/asset_pipeline/`
- **UI source:** `src/ui/`
- **View types:** `src/ui/views/*.cr` (Label, Button, VStack, HStack, ZStack, Image, TextField, ScrollView, Spacer)
- **Base class:** `src/ui/view.cr` (abstract `UI::View` + value types + enums)
- **Visitor interface:** `src/ui/platform_visitor.cr` (abstract `UI::PlatformVisitor`)
- **Renderers:** `src/ui/renderers/*.cr`
- **Native infra:** `src/ui/native/*.cr` (NativeHandle, CallbackRegistry, NativeView)
- **Architecture plan:** `.claude/cross_platform_plan.md`

## Review Checklist

### 1. Visitor Pattern Completeness

Every `UI::View` subclass MUST implement the `accept(visitor : PlatformVisitor)` method. Check that:

- All concrete view classes in `src/ui/views/` have `def accept(visitor : PlatformVisitor)` that calls `visitor.visit(self)`
- The `PlatformVisitor` abstract class in `src/ui/platform_visitor.cr` has an `abstract def visit(view : <Type>)` for every concrete view type
- The two lists match exactly -- no view type is missing from the visitor, and no visitor method lacks a corresponding view type

**How to check:**
- Glob `src/ui/views/*.cr` to find all view types
- Read `src/ui/platform_visitor.cr` to find all abstract visit methods
- Compare the two lists

### 2. Web::Renderer Delegation to Components::Elements

The `Web::Renderer` MUST delegate to existing `Components::Elements` classes. It should NOT reimplement HTML generation. Check that:

- Each `visit` method in `Web::Renderer` creates instances of `Components::Elements::*` classes (Div, Span, Button, Img, Input, etc.)
- No raw HTML string concatenation (e.g., `"<div>"` or `String::Builder` with HTML tags)
- The renderer uses the `<<` operator or `add_children` methods of Elements classes

**Flag as error:** Any `visit` method that builds HTML strings manually instead of using `Components::Elements`.

### 3. NativeHandle Ownership

Every `NativeHandle` must have the correct `ReleaseStrategy`. Check that:

- `ObjC.owned(ptr)` is used for objects Crystal creates (alloc/init)
- `ObjC.borrowed(ptr)` is used for objects Crystal receives but does not own (e.g., `contentView`, `superview`)
- `JNI.global(env, local_ref)` is used for Android objects that must outlive the current JNI call
- No raw `Void*` pointers are stored without being wrapped in `NativeHandle`
- `NativeView.teardown!` is called when a view tree is dismounted

**Flag as error:** A `Void*` returned from an ObjC `alloc/init` sequence that is not wrapped in `ObjC.owned()`.
**Flag as error:** A `Void*` from `contentView` or `superview` wrapped in `ObjC.owned()` (should be `ObjC.borrowed()`).

### 4. CallbackRegistry Registration/Unregistration Pairing

Every callback registered with `CallbackRegistry.register()` must eventually be unregistered. Check that:

- Button `on_tap` procs are registered when the button is rendered natively
- The callback ID is stored in a location accessible during teardown
- `CallbackRegistry.unregister(id)` is called in the teardown/cleanup path
- No orphaned registrations that would leak memory

**Flag as warning:** A `register` call without a corresponding `unregister` in the teardown path.

### 5. Recursive Struct Detection

Crystal prohibits recursive struct types. A view type that contains `Array(View)` children MUST be a class, not a struct. Check that:

- No `struct` keyword is used for any type under `UI::` that contains `View` or `Array(View)`
- Container views (VStack, HStack, ZStack, ScrollView) are defined with `class`, not `struct`
- Value types (Color, Font, EdgeInsets) are `record` (struct) -- this is correct since they do not reference `View`

**Flag as error:** Any `struct` definition that has a property of type `View`, `View?`, or `Array(View)`.

### 6. Compile-Time Flag Gating

Platform-specific code must be gated behind the correct `flag?()` checks. Check that:

- AppKit/NSView code is inside `{% if flag?(:macos) %}`
- UIKit/UIView code is inside `{% if flag?(:ios) %}`
- Android/JNI code is inside `{% if flag?(:android) %}`
- ObjC bridge calls are inside `{% if flag?(:darwin) %}` or `{% if flag?(:macos) || flag?(:ios) %}`
- No platform-specific `lib` bindings leak outside their flag guards

**Flag as error:** A call to `LibObjC` or `LibJNI` outside of a compile-time flag guard.

### 7. Property Type Consistency

Verify that property types in view classes match the architecture plan:

- `Alignment` is the `UI::Alignment` enum (not `Symbol`)
- `ContentMode` is the `UI::ContentMode` enum (not `Symbol`)
- `KeyboardType` is the `UI::KeyboardType` enum (not `Symbol`)
- Colors are `UI::Color` (not `String` hex values)
- Fonts are `UI::Font` records (not raw strings/numbers)

**Flag as warning:** A property that uses `Symbol` where a dedicated enum exists.

## Output Format

For each finding, report:

```
[ERROR|WARNING] <file_path>:<line_number>
<description of the issue>
Expected: <what should be there>
Found: <what is actually there>
```

Summarize at the end with counts: `X errors, Y warnings`.
Loading