Skip to content

Conversation

@Kitenite
Copy link
Contributor

No description provided.

@Kitenite Kitenite changed the title Cleanup Code clean up Jun 26, 2024
@Kitenite Kitenite merged commit ac45bc9 into main Jun 26, 2024
@Kitenite Kitenite deleted the preload branch June 26, 2024 18:57
Nithishvb pushed a commit to Nithishvb/onlook that referenced this pull request May 11, 2025
@coderabbitai coderabbitai bot mentioned this pull request Aug 16, 2025
6 tasks
paritoshk added a commit to paritoshk/onlook that referenced this pull request Dec 15, 2025
…to-expand)

Implements three high-impact UX improvements identified from user journey analysis:

## 1. Save State Indicator (onlook-dev#1 Priority - CRITICAL)
**Problem**: Users had no visibility into whether changes were saved
**Solution**: Real-time visual feedback in top bar

- Created SaveStateManager to track save states (saved/saving/unsaved)
- Integrated into EditorEngine lifecycle
- CodeManager notifies on write start/complete/error
- Visual indicator shows: spinning "Saving...", checkmark "Saved", orange dot "Unsaved"
- Tooltip displays time since last save

**Files**:
- apps/web/client/src/components/store/editor/save-state/index.ts (NEW)
- apps/web/client/src/app/project/[id]/_components/top-bar/save-indicator.tsx (NEW)
- apps/web/client/src/components/store/editor/engine.ts
- apps/web/client/src/components/store/editor/code/index.ts
- apps/web/client/src/app/project/[id]/_components/top-bar/index.tsx

**Impact**: Builds user trust, eliminates confusion about save status

---

## 2. Example Prompts (onlook-dev#5 - Conversion Boost)
**Problem**: Empty chat provided no guidance for new users
**Solution**: Mode-specific clickable example prompts

- 3 examples per mode (CREATE/EDIT/ASK/FIX)
- Auto-send message on click
- Examples: "Add hero section", "Change button color", "Explain component", "Fix layout"

**Files**:
- apps/web/client/src/app/project/[id]/_components/right-panel/chat-tab/chat-messages/example-prompts.tsx (NEW)
- apps/web/client/src/app/project/[id]/_components/right-panel/chat-tab/chat-messages/index.tsx
- apps/web/client/src/app/project/[id]/_components/right-panel/chat-tab/chat-tab-content/index.tsx

**Impact**: Reduces time-to-first-message, lowers cognitive load

---

## 3. Auto-Expand Last Tool Call (onlook-dev#4 - Transparency)
**Problem**: Users manually clicked every tool to see AI actions
**Solution**: Latest tool call auto-expands

- Identifies last tool in message parts
- Passes defaultOpen flag to CollapsibleCodeBlock
- Previous tools remain collapsed
- Works with all code editing tools

**Files**:
- apps/web/client/src/app/project/[id]/_components/right-panel/chat-tab/chat-messages/message-content/index.tsx
- apps/web/client/src/app/project/[id]/_components/right-panel/chat-tab/chat-messages/message-content/tool-call-display.tsx
- apps/web/client/src/app/project/[id]/_components/right-panel/chat-tab/code-display/collapsible-code-block.tsx

**Impact**: Improves transparency, reduces clicks

---

## Testing
All changes type-checked successfully with `bun run typecheck`

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

Co-Authored-By: Claude Sonnet 4.5 <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