← Back to list

ui-review
by roznet
⭐ 2🍴 1📅 Jan 17, 2026
SKILL.md
name: ui-review description: > Review code changes in web/client/ts/ for compliance with architecture principles. Use when reviewing TypeScript UI code, checking store patterns, or validating separation of concerns. Verifies Zustand store as single source of truth, reactive updates, and proper component communication patterns. allowed-tools: Read, Glob, Grep
UI Architecture Review
Review code changes in web/client/ts/ for compliance with architecture principles.
Architecture Rules
-
Store is Single Source of Truth:
- All state lives in Zustand store (
ts/store/store.ts) - No duplicated state in components
- All state lives in Zustand store (
-
State Updates via Actions:
- Use
store.getState().setX()methods - Never direct assignment
- Use
-
Component Communication Patterns:
- Store updates (primary method)
- Custom events (cross-component actions)
- Public API methods (limited, well-defined)
- Never direct private method calls across components
-
No Direct DOM Manipulation:
- Update store first
-
Reactive Updates:
- UI/map updates via store subscriptions
- Not manual calls after store updates
-
Separation of Concerns:
UIManager= UI/DOM handling onlyAPIAdapter= API communication onlyStore= State management onlyVisualizationEngine= Map rendering onlyLLMIntegration= LLM orchestration only
Review Checklist
Store as Source of Truth
- All state updates use
store.getState().setX()actions? - No direct state manipulation?
- No duplicated state in components?
Component Communication
- LLMIntegration -> UIManager uses public APIs or events only?
- No private method calls across components?
- Cross-component updates go through store or events?
Separation of Concerns
- UIManager doesn't make direct API calls?
- APIAdapter doesn't manage state or manipulate DOM?
- Store doesn't contain business logic or UI code?
Reactive Updates
- UI updates happen via
store.subscribe()? - No manual
updateUI()calls afterstore.setX()?
Red Flags
Flag these violations immediately:
- Direct state assignment:
state.airports = ...,state.filters.country = ... - Direct DOM without store:
element.value = ...withoutstore.setSearchQuery() - Private method calls:
this.uiManager.handleSearch()(handleSearch is private) - API calls outside APIAdapter:
fetch(...)in UIManager - Manual UI updates after store:
updateUI()right afterstore.setX() - Duplicated state: Component maintains its own copy of store state
- Tight coupling: Direct instantiation like
new OtherComponent()
Output Format
APPROVED:
file:line- Explanation of why it's correct
VIOLATION:
file:line- Description- Problem: Why it violates architecture
- Fix: Suggested corrected implementation
- Pattern: Reference to approved pattern
Approved Patterns
Store Update Pattern:
// GOOD: Update store, components react via subscription
store.getState().setAirports(airports);
// UI updates automatically via store.subscribe() in UIManager
Event Pattern:
// GOOD: Loose coupling via events
window.dispatchEvent(new CustomEvent('trigger-search', {
detail: { query: "EGKB LFPG" }
}));
Public API Pattern:
// GOOD: Public method designed for external use
// In UIManager:
public syncFiltersToUI(filters: Partial<FilterConfig>): void { ... }
// In LLMIntegration:
this.uiManager.syncFiltersToUI(filters); // OK, public API
Available Custom Events
trigger-search- Trigger a searchtrigger-locate- Trigger a locate searchtrigger-filter-refresh- Load airports matching current store filtersrender-route- Render route on mapreset-rules-panel- Clear rules panel stateshow-country-rules- Display country rules in Rules panelairport-click- Trigger airport selectiondisplay-airport-details- Display airport details in right panel
Reference
designs/UI_FILTER_STATE_DESIGN.md- Detailed examplesdesigns/CHATBOT_WEBUI_DESIGN.md- LLM integration specifics
Score
Total Score
60/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon