Skip to content

Sprint 2: View Migration Progress (PromptWorkbench & Repository) - #17

Merged
rand merged 2 commits into
mainfrom
sprint2/migrate-remaining-views
Oct 12, 2025
Merged

rand merged 2 commits into
mainfrom
sprint2/migrate-remaining-views

Conversation

@rand

@rand rand commented Oct 12, 2025

Copy link
Copy Markdown
Owner

Summary

Sprint 2 progress: Migrating remaining views to the design system. This PR includes the first 2 major view migrations.

✅ Sprint 2.1: Migrate PromptWorkbenchView

  • Removed: 30+ inline styles and CSS objects
  • Added: ScrollArea component with Radix UI
  • Features:
    • Session list sidebar with Card + ScrollArea
    • Session items with hover states and transitions
    • Badge components for status indicators
    • Nested Card structure for ambiguities
    • Input/Textarea components throughout
    • Alert variants for success/error states
    • RefreshCw, X, CheckCircle2 icons

✅ Sprint 2.2: Migrate RepositoryView

  • Removed: 25+ inline styles, 8 CSS style objects
  • Features:
    • Responsive repository grid (md:grid-cols-2, lg:grid-cols-3)
    • Card-based repo selection with border-brand highlight
    • Label + Input form components
    • Alert variants for loading/error/success states
    • Timeline with ScrollArea and visual hierarchy (border-l-2)
    • Action banner with accent background
    • RefreshCw, CheckCircle2, AlertCircle icons

New Components

  • ScrollArea: Added with @radix-ui/react-scroll-area package
    • Used in PromptWorkbenchView for session list and IR preview
    • Used in RepositoryView for timeline (400px height)

Performance

PromptWorkbenchView:

  • Chunk size: 20.47 kB (6.40 kB gzipped)
  • Lazy loaded on demand

RepositoryView:

  • Chunk size: 5.96 kB (2.22 kB gzipped)
  • Lazy loaded on demand

ScrollArea (shared):

  • Chunk size: 12.53 kB (3.96 kB gzipped)

Main bundle: Stable at ~54 kB (20.47 kB gzipped)

Design System Progress

Views Migrated: 4/9 (44%)

  • ✅ ConfigurationView (Sprint 1.1)
  • ✅ SignInView (Sprint 1.2)
  • ✅ PromptWorkbenchView (Sprint 2.1)
  • ✅ RepositoryView (Sprint 2.2)
  • ⏳ EnhancedIrView (Sprint 2.3) - Next
  • ⏳ IdeView (Sprint 2.4)
  • ⏳ PlannerView (Sprint 2.5)
  • ⏳ IrView (Sprint 2.6)

Inline Styles Removed: ~70/140 (50%)

Design Patterns Established

All migrated views consistently use:

  • Card structure (Header, Title, Description, Content)
  • ScrollArea for overflow management
  • Alert components for feedback (destructive, success, info)
  • Badge for status indicators
  • Label + Input/Textarea pairs
  • Separator between sections
  • Lucide icons throughout
  • Responsive grid layouts
  • Hover states with transitions
  • Consistent spacing (space-y-*)

Testing

  • ✅ Build succeeds with no TypeScript errors
  • ✅ All chunks generated correctly
  • ✅ No bundle size warnings
  • ✅ Lazy loading functional
  • ✅ Pre-commit hooks pass

Files Changed

  • frontend/package.json - Added @radix-ui/react-scroll-area
  • frontend/src/components/ui/scroll-area.tsx - New component
  • frontend/src/views/PromptWorkbenchView.tsx - Migrated (427 lines)
  • frontend/src/views/RepositoryView.tsx - Migrated (306 lines)

Next Steps

Continue Sprint 2 with remaining views:

  • Sprint 2.3: EnhancedIrView (20 inline styles)
  • Sprint 2.4: IdeView (18 inline styles)
  • Sprint 2.5: PlannerView (15 inline styles)
  • Sprint 2.6: IrView (12 inline styles)

🤖 Generated with Claude Code

rand and others added 2 commits October 11, 2025 20:52
Remove all 30+ inline styles, replacing with design system components:

New Components Created:
- ScrollArea component with Radix UI (@radix-ui/react-scroll-area)

PromptWorkbenchView Changes:
- Session list sidebar → Card with ScrollArea
- Session items → Card with hover states and transitions
- Status badges → Badge component with variants
- Create form → Card with Textarea, proper structure
- Error alerts → Alert component with destructive variant
- Session info → Card with Badge components for status/draft/validation
- IR preview → Card with ScrollArea and proper code styling
- Ambiguities → Nested Card structure with proper spacing
- Suggestions → Button components with secondary variant
- Resolution inputs → Input component
- Success state → Alert with success variant

Design System Improvements:
- RefreshCw, X, CheckCircle2 icons from lucide-react
- Proper hover states and transitions
- Consistent spacing with space-y-* classes
- ScrollArea for overflow management
- Badge variants for semantic colors
- Proper card nesting and structure

Result: 0 inline styles, 100% design system usage

Bundle Impact:
- PromptWorkbenchView chunk: 20.47 kB (6.40 kB gzipped)
- Lazy loaded on demand

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Remove all 25+ inline styles and CSS object definitions, replacing with design system components:

RepositoryView Changes:
- Removed all CSS style objects (formGridStyle, repoGridStyle, repoButtonStyle, labelStyle, inputStyle, timelineStyle, timelineItemStyle, actionBannerStyle)
- Main structure → Proper Card with CardHeader, CardTitle, CardDescription, CardContent
- Repository grid → Responsive grid with Card components for each repo
- Selected state → border-brand and bg-accent classes with transitions
- Loading/error states → Alert components with proper icons
- Form inputs → Label + Input components with proper structure
- Success/error messages → Alert variants (success/destructive)
- Timeline → Ordered list with border-l-2 border-brand/50 for visual hierarchy
- Timeline items → Proper spacing with space-y-4 and space-y-2
- Timeline actions → Button components with ghost variant
- Action banner → Card with bg-accent/50
- Separator added between major sections
- ScrollArea for timeline with 400px height

Design System Improvements:
- RefreshCw, CheckCircle2, AlertCircle icons from lucide-react
- Proper responsive breakpoints (md:grid-cols-2, lg:grid-cols-3)
- Consistent spacing throughout
- Hover states with transition-all
- Line-clamp-2 for description truncation
- Badge variants for timeline status

Result: 0 inline styles, 0 CSS objects, 100% design system usage

Bundle Impact:
- RepositoryView chunk: 5.96 kB (2.22 kB gzipped)
- ScrollArea shared chunk: 12.53 kB (3.96 kB gzipped)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@rand
rand merged commit 647c159 into main Oct 12, 2025
1 of 5 checks passed
@rand
rand deleted the sprint2/migrate-remaining-views branch October 12, 2025 02:56
rand added a commit that referenced this pull request Oct 20, 2025
* Sprint 2.1: Migrate PromptWorkbenchView to design system

Remove all 30+ inline styles, replacing with design system components:

New Components Created:
- ScrollArea component with Radix UI (@radix-ui/react-scroll-area)

PromptWorkbenchView Changes:
- Session list sidebar → Card with ScrollArea
- Session items → Card with hover states and transitions
- Status badges → Badge component with variants
- Create form → Card with Textarea, proper structure
- Error alerts → Alert component with destructive variant
- Session info → Card with Badge components for status/draft/validation
- IR preview → Card with ScrollArea and proper code styling
- Ambiguities → Nested Card structure with proper spacing
- Suggestions → Button components with secondary variant
- Resolution inputs → Input component
- Success state → Alert with success variant

Design System Improvements:
- RefreshCw, X, CheckCircle2 icons from lucide-react
- Proper hover states and transitions
- Consistent spacing with space-y-* classes
- ScrollArea for overflow management
- Badge variants for semantic colors
- Proper card nesting and structure

Result: 0 inline styles, 100% design system usage

Bundle Impact:
- PromptWorkbenchView chunk: 20.47 kB (6.40 kB gzipped)
- Lazy loaded on demand

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Sprint 2.2: Migrate RepositoryView to design system

Remove all 25+ inline styles and CSS object definitions, replacing with design system components:

RepositoryView Changes:
- Removed all CSS style objects (formGridStyle, repoGridStyle, repoButtonStyle, labelStyle, inputStyle, timelineStyle, timelineItemStyle, actionBannerStyle)
- Main structure → Proper Card with CardHeader, CardTitle, CardDescription, CardContent
- Repository grid → Responsive grid with Card components for each repo
- Selected state → border-brand and bg-accent classes with transitions
- Loading/error states → Alert components with proper icons
- Form inputs → Label + Input components with proper structure
- Success/error messages → Alert variants (success/destructive)
- Timeline → Ordered list with border-l-2 border-brand/50 for visual hierarchy
- Timeline items → Proper spacing with space-y-4 and space-y-2
- Timeline actions → Button components with ghost variant
- Action banner → Card with bg-accent/50
- Separator added between major sections
- ScrollArea for timeline with 400px height

Design System Improvements:
- RefreshCw, CheckCircle2, AlertCircle icons from lucide-react
- Proper responsive breakpoints (md:grid-cols-2, lg:grid-cols-3)
- Consistent spacing throughout
- Hover states with transition-all
- Line-clamp-2 for description truncation
- Badge variants for timeline status

Result: 0 inline styles, 0 CSS objects, 100% design system usage

Bundle Impact:
- RepositoryView chunk: 5.96 kB (2.22 kB gzipped)
- ScrollArea shared chunk: 12.53 kB (3.96 kB gzipped)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
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