Skip to content

feat(studio): add Edit Range toolbar with Copy to Agent#65

Merged
miguel-heygen merged 2 commits intomainfrom
studio/5-edit-range
Mar 28, 2026
Merged

feat(studio): add Edit Range toolbar with Copy to Agent#65
miguel-heygen merged 2 commits intomainfrom
studio/5-edit-range

Conversation

@miguel-heygen
Copy link
Copy Markdown
Collaborator

@miguel-heygen miguel-heygen commented Mar 26, 2026

Summary

  • Replace Split/Delete buttons with Edit Range toolbar
  • Edit button opens a time-range selection on the timeline
  • "Copy to Agent" exports the selected range as a prompt-ready description
  • Range selection shows start/end times with drag handles

🤖 Generated with Claude Code

@miguel-heygen miguel-heygen force-pushed the studio/4-layout-config branch from 3814bd6 to b31f9b4 Compare March 26, 2026 18:29
@miguel-heygen miguel-heygen force-pushed the studio/5-edit-range branch 2 times, most recently from 844761d to 6d21e8f Compare March 26, 2026 18:37
@miguel-heygen miguel-heygen force-pushed the studio/4-layout-config branch from b31f9b4 to 47085f8 Compare March 26, 2026 18:37
@miguel-heygen miguel-heygen force-pushed the studio/4-layout-config branch 2 times, most recently from 42ea330 to 5736c89 Compare March 26, 2026 19:25
@miguel-heygen miguel-heygen force-pushed the studio/5-edit-range branch 2 times, most recently from 3c3bf65 to 1646732 Compare March 26, 2026 19:47
@miguel-heygen miguel-heygen force-pushed the studio/4-layout-config branch from 5736c89 to 065bdb9 Compare March 26, 2026 19:47
@miguel-heygen miguel-heygen force-pushed the studio/4-layout-config branch from 065bdb9 to 7322b6b Compare March 26, 2026 19:54
@miguel-heygen miguel-heygen force-pushed the studio/4-layout-config branch from 7322b6b to cb136dd Compare March 26, 2026 20:05
@miguel-heygen miguel-heygen reopened this Mar 26, 2026
@miguel-heygen miguel-heygen force-pushed the studio/4-layout-config branch from 89b1ccc to fe108bc Compare March 26, 2026 20:21
@miguel-heygen miguel-heygen force-pushed the studio/5-edit-range branch 2 times, most recently from f30719f to cc0812b Compare March 26, 2026 20:25
@miguel-heygen miguel-heygen force-pushed the studio/4-layout-config branch from fe108bc to f92d4ad Compare March 26, 2026 20:25
@vanceingalls
Copy link
Copy Markdown
Collaborator

Review: PR #65 — Edit Range Toolbar

Smart architectural decision — replacing ~400 lines of fragile split/delete code with agent handoff. The structured clipboard payload is well-designed for AI consumption.

Issues

[Important] `EditModal` has a local `formatTime` that shadows the shared utility. Shows `"2.5s"` format vs the shared `time.ts` `"0:02"` format. Time displays in the edit modal will look inconsistent with the player controls and timeline ruler.

[Important] `EditModal` reads `currentTime` from the store, but during playback the store's `currentTime` is only updated at end of playback or on seek — the RAF loop only updates `liveTime`. The time shown in the modal may be stale by several seconds if opened while playing.

**[Suggestion] `TimelineToolbar` shows `(E)` in the edit button title but doesn't register keyboard handlers. Zoom shortcuts (Cmd+/Cmd-) also not handled.

What's well done

  • "Copy to Agent" with structured payload (time range, elements, prompt) is exactly the right pattern for agent collaboration
  • Range sliders normalize with Math.min/Math.max to handle inverted ranges
  • Clipboard fallback for older browsers
  • Clean separation: toolbar triggers modal, modal builds context, agent does the mutation

Copy link
Copy Markdown
Collaborator Author

miguel-heygen commented Mar 28, 2026

Merge activity

@miguel-heygen miguel-heygen force-pushed the studio/4-layout-config branch from accaf1d to 35185cb Compare March 28, 2026 17:40
@miguel-heygen miguel-heygen force-pushed the studio/4-layout-config branch from 35185cb to 59a4e18 Compare March 28, 2026 18:00
@miguel-heygen miguel-heygen force-pushed the studio/4-layout-config branch from 59a4e18 to e4ca7c4 Compare March 28, 2026 18:05
@miguel-heygen miguel-heygen force-pushed the studio/4-layout-config branch from e4ca7c4 to e8662d9 Compare March 28, 2026 18:12
@miguel-heygen miguel-heygen force-pushed the studio/5-edit-range branch 2 times, most recently from 6feae67 to d4b089e Compare March 28, 2026 18:15
@miguel-heygen miguel-heygen force-pushed the studio/4-layout-config branch 2 times, most recently from a4b8c6f to d1ad101 Compare March 28, 2026 18:27
@miguel-heygen miguel-heygen force-pushed the studio/4-layout-config branch 2 times, most recently from b088b34 to fa4b1e4 Compare March 28, 2026 19:40
@miguel-heygen miguel-heygen changed the base branch from studio/4-layout-config to graphite-base/65 March 28, 2026 19:44
- NLELayout: add toolbar slot, composition breadcrumb, improved resizing
- App: update toolbar wiring, remove split/delete, add edit modal
- Remove AgentActivityTrack (unused)
- Update vite config with improved dev server and build settings
- Update package.json dependencies
- Simplify htmlEditor.ts (keep parseStyleString, mergeStyleIntoTag, findElementBlock)
- Update exports in index.ts
@graphite-app graphite-app bot changed the base branch from graphite-base/65 to main March 28, 2026 19:45
- Add TimelineToolbar with Edit button (replaces Split/Delete)
- Add EditModal with time range selection, element list, prompt textarea
- "Copy to Agent" copies structured context to clipboard
- Wire toolbar and modal into App.tsx
@miguel-heygen miguel-heygen merged commit 0167e69 into main Mar 28, 2026
15 checks passed
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.

2 participants