A solo creator filming a tutorial can run through the same line several times without stopping the camera. The footage contains the good take, but the timeline doesn't tell you where it is. Cutback uses Even G2 to capture two simple decisions while filming: keep this moment or mark a restart. Later, those decisions become a seekable edit map and a shared record in Telegram.
The interesting engineering problem was keeping the same intent intact across three surfaces: a gesture on the glasses, a frame in a browser player, and a message an editor can reply to.
Architecture: Share metadata, keep the video local
flowchart LR C["Creator"] --> G["Even G2 / simulator"] G <-->|"Even Hub SDK"| W["Receiver WebView"] W <-->|"Poll state / post action"| N["Node.js HTTP server"] S["Vite / TypeScript Studio"] <-->|"Take and marker metadata"| N V["Camera or attached video"] -->|"MediaRecorder / local object URL"| S N <-->|"Atomic snapshot"| F["JSON file"] N <-->|"getUpdates / sendMessage / editMessageText"| T["Private Telegram group"] E["Editor"] -->|"Reply to current card"| T Studio and the glasses receiver load the same Vite build through different routes. The server uses Node's HTTP and filesystem modules; it doesn't receive recorded clips. Studio plays captures or attached files through local object URLs. The bundled sample is served as a static asset with byte-range support. Telegram receives the title, timecodes, marker types, and notes as text.
This split makes it possible to rehearse the entire workflow with no camera, bot token, or external video storage. Live mode adds a Telegram connection to the same server-side state machine.
A gesture is an action on the take it was shown
The Even Hub SDK creates a single event-capturing text container. Cutback updates that container in place rather than rebuilding it for each marker. The receiver keeps the action associated with the display last acknowledged by the bridge. While rolling, a click sends Keep and a long press sends Restart; between takes, a click can accept the note shown on the lens.
The event mapping in src/glasses.ts is deliberately small:
const input = event.sysEvent ?? event.textEvent if (!input) return const kind = input.eventType ?? OsEventTypeList.CLICK_EVENT // After handling the system exit events: const action = shown?.action if (!action) return if (kind === OsEventTypeList.CLICK_EVENT) onAction(action) if (kind === OsEventTypeList.LONG_PRESS_EVENT && 'kind' in action) { onAction({ ...action, kind: 'restart' }) } The event envelope check matters: the bridge can omit the zero-valued click event type. An event without a system or text envelope must not become a click. The double-click path calls shutDownPageContainer(1) to let the platform show its exit confirmation.
The action includes a take ID. On the server, active(state, body.take) rejects actions for a replaced take before mutation. Marker creation also checks that the take hasn't wrapped. A network delay should never move a gesture from one take to the next.
Store elapsed time, format it for the viewer
The persisted marker is small: { id, kind, ms }. Real takes use elapsed server time. Only sample-mode Studio controls accept a playhead override, so someone rehearsing can pause and mark the same moment twice. Simulator gestures use the real session clock even in sample mode.
export function elapsed(take: Take, now: number) { const length = Math.max(0, (take.ended ?? now) - take.started) return take.sample ? Math.min(length, sampleLength) : length } The UI renders this timing as MM:SS:FF at 24 fps. That notation is a display choice; it does not establish frame-accurate synchronization with an external camera. Studio can apply a manual offset when seeking an attached clip. A useful next feature would let a creator align a clap or slate against a marker and persist the result.
Telegram: Use the message as the shared record
At wrap, the bot posts the map once and stores the returned message ID. An editor creates a retake by replying directly to it, for example:
/retake@YourBot 3 Redo the final pour a little slower. The handler in telegram.ts checks the configured group and editor, verifies that the replied-to message is the current card, and passes the marker number to the domain layer. A note can't be attached to a nonexistent marker. The receiver shows the oldest pending note, and accepting the same note twice is harmless.
sequenceDiagram participant S as Studio participant N as Node server participant T as Telegram group participant G as G2 receiver S->>N: Wrap take N->>T: sendMessage(edit map) T-->>N: message_id Note over T: Authorized editor replies with marker and note T-->>N: getUpdates returns reply G->>N: GET /api/state N-->>G: Pending retake note G->>N: POST /api/accept with take ID and note ID N->>T: editMessageText with original message_id The publishing branch is the same for initial delivery and later updates. The existing card is the switch:
const result = card ? await call('editMessageText', { chat_id: config.chat, message_id: card, text }) : await call<Message>('sendMessage', { chat_id: config.chat, text }) The worker shares one in-flight publish promise and checks whether the latest text has already been delivered. Incoming updates persist the next polling offset with the local state change, so a replay after restart doesn't append a second note. There's a boundary the app can't make atomic: Telegram may accept the initial send just before the process exits and before the returned ID is stored. A restart in that window can produce an extra card.
Testing the real loop
The tests drive the domain rules and the Telegram integration through a mocked Bot API. They cover stale actions, marker validation, ordered and idempotent acceptance, authorization, replay after reopening the store, and updates that keep the same message ID.
For the real demo, the official Even Hub simulator created Keep → Restart → Keep in Studio. At wrap, the browser jumped directly to the clean pass. An authorized editor replied in a real private Telegram group; a simulator tap then changed the original bot message to Accepted. Browser camera capture was also tested with simulated camera and microphone input. The project hasn't been tested on physical G2 hardware.
What I'd build next
The biggest product question is whether these marks save enough time on a real shoot to change someone's editing routine. I'd test that with creator–editor pairs before expanding the interface. If the workflow sticks, the next engineering steps are marker export to an editing app, persisted camera alignment, and take history with stable links between each take and its Telegram card.
Code & more: https://www.dailybuild.xyz/project/330-cutback

