Skip to content

feat(studio): prompt-first home page, Deepiri branding, and delete/timeline fixes - #92

Open
PeytonLi wants to merge 1 commit into
peytonli/feat/ai-prompt-loopfrom
peytonli/fix/ui-ux-fixes
Open

feat(studio): prompt-first home page, Deepiri branding, and delete/timeline fixes#92
PeytonLi wants to merge 1 commit into
peytonli/feat/ai-prompt-loopfrom
peytonli/fix/ui-ux-fixes

Conversation

@PeytonLi

Copy link
Copy Markdown
Contributor

Stacked PR. Base is peytonli/feat/ai-prompt-loop, not dev — this builds directly on the AI prompt loop work (the accept → timeline path) and should merge after it. Review the diff against that base.

Description

UI/UX pass over the desktop app, plus the root-cause fix for the dead Delete button on the home page.

  • Component affected: apps/desktop-tauri/ui (studio + home views), services/orchestrator (project delete)
  • Purpose: bug fix + improvement
  • Related Issue: n/a
  • Plaky feature: n/a

The headline change is that the home page is now prompt-first. You describe a video, it creates the project, submits the AI job, and puts you in the editor with the generated clip landing on the timeline. Templates keep their own path: straight into the editor with that template's presets.

Changes

  • Delete button on the home page now works. Root cause was server-side: studio.delete_project called db_repos.delete_project, which did not exist, so every delete raised AttributeError → 500. The client compounded it — orchestratorDeleteProject called res.json() with no res.ok check, so the non-JSON error body threw a parse error that renderHomeProjects swallowed into console.error, leaving the card on screen. Added the missing repo function (children already on delete cascade), added the res.ok check, and the UI now reports a failed delete instead of going quiet. This also fixes deleting your last project resurrecting it, since list_projects falls back to Postgres when the memory store is empty.
  • Template presets actually reach the editor. openProject never loaded the sequence's tracks, so the hardcoded starter timeline from createInitialState() (Clip A, Clip B, Title, VO) stayed put — picking the 7-track Documentary template opened onto three demo tracks. New ops/loadSequence.ts replaces the starter timeline with the sequence's real tracks and clips on every entry path.
  • Prompt-first home page. New ops/aiLaunch.ts takes a prompt → project → sequence → video track → submitted AI job. Four hardcoded starter prompts render as one-click chips. Enter submits; Shift+Enter newlines. On this path the clip is auto-accepted when the job reaches review — the AI panel's own Submit keeps the explicit Accept/Reject gate.
  • Deepiri logo top-left in both topbars, from public/deepiri-logo.png. The supplied artwork had an opaque near-white background that would have rendered as a white box on the dark topbar, so the outer background was flood-filled to transparent from the edges (light areas inside the mark preserved). Swapping the artwork later is a file drop at that path — no code change.
  • Hero restyled. Dropped "Welcome to"; Render and Flow now carry their own colors so each word reads independently.
  • Dev Mode toggle removed. state.devMode still reads from localStorage, so the devtools drawer stays reachable via localStorage.setItem("deepiri_dev_mode","true").
  • Timeline quick wins (from the gap review below): ripple delete (Shift+Del / "Ripple"), duplicate (Ctrl+D / "Duplicate"), and snapping to clip edges, the playhead, and zero while dragging or trimming (~8px, zoom-scaled, so single-frame nudges still work).
  • Fixed accelerating clip drags. The drag handler applied a delta measured from the drag origin against the clip's live position on every pointermove, compounding as you dragged. Now positioned absolutely from the origin.
  • Escaped user text interpolated into innerHTML. AI project names are the user's prompt verbatim, and this is a desktop webview — injected markup would run with the app's privileges. New renderer/escape.ts applied to project names, asset names, and asset URIs.
  • Structural: home markup extracted out of studioApp.ts into renderer/home.ts + renderer/brand.ts, which is what makes it testable in the existing node test env (no jsdom dependency added).
  • New doc: docs/specs/editor-feature-gap-analysis.md — what standard NLEs offer vs. what we have, tiered by payoff, with a suggested order. Sourced, not vibes.

Related

  • Issue: n/a
  • Plaky: n/a
  • Related PRs: stacked on peytonli/feat/ai-prompt-loop

Testing

Automated, all green:

  • UI: npm test in apps/desktop-tauri/ui144 passing (102 before this PR, +42). npx tsc --noEmit clean, npx vite build succeeds and ships the logo.
  • Orchestrator: pytest tests/118 passing (115 before, +3).

New coverage: project delete route (including the last-project-resurrection case), orchestratorDeleteProject failure surfacing, launchAiProject, loadSequenceTracks, ripple delete / duplicate / snapping, HTML escaping, and the home markup contract (no "Welcome to", no Dev Mode button, two-tone brand, logo present, starter prompts rendered).

Manual check worth doing on your side, since none of it is automated: run the app with the orchestrator up, click a starter prompt, and confirm you land in the editor and the clip appears when the job finishes. Then delete a project from the home page and confirm the card goes away.

Important Notes

  • Auto-accept was my default choice on the home-prompt path — you asked for a video, you get a video. If you'd rather keep the review gate on both paths, it's a one-line change (startJobPolling(id, true)false).
  • Tauri app icons untouched. src-tauri/icons/ is still the default plain blue squares — that's the window, taskbar and installer icon. npx @tauri-apps/cli icon regenerates all sizes from the logo (wants the opaque original, not the transparent one, for the square tile formats). Left out to keep this PR's diff free of ~20 binary files.
  • Known limitation: the res.ok check was added to the delete path only. The same "parse the body without checking status" pattern exists in most of backendApi.ts; fixing it wholesale would change behaviour at many call sites and break mocks, so it wants its own PR.
  • Requires the orchestrator running on 127.0.0.1:8080 to test.

Workflow Checklist

  • Branch is up to date with its base (peytonli/feat/ai-prompt-loop @ ab69b30)
  • PR is from your branch → dev — intentionally not: stacked onto peytonli/feat/ai-prompt-loop per request. Retarget to dev once the parent merges.
  • PR title follows convention
  • Plaky feature/bug name included above — none provided
  • Tagged @Team-Deepiri/support-team
  • Plaky feature moved to "Needs QA" — over to you

Review Requests

@Team-Deepiri/support-team

…meline fixes

Home page becomes the entry point for generating video: a prompt box with
one-click starter prompts creates the project, submits the AI job, and drops
the user into the editor with the clip auto-accepted on arrival. Picking a
template still goes straight to the editor with that template's presets.

Fixes the Delete button on the home page. Root cause was server-side:
studio.delete_project called db_repos.delete_project, which never existed, so
every delete raised AttributeError and returned 500. The client compounded it
by calling res.json() with no res.ok check, so the non-JSON error body threw a
parse error that renderHomeProjects swallowed into console.error and the card
stayed on screen. Deleting the last project also resurrected it, since
list_projects falls back to Postgres when the memory store is empty.

Template presets never reached the editor either: openProject left the
hardcoded starter timeline from createInitialState() in place and never loaded
the sequence's tracks, so a 7-track Documentary opened on three demo tracks
full of placeholder clips. loadSequenceTracks now replaces it on every entry
path.

Timeline quick wins from the feature gap review: ripple delete (Shift+Del),
duplicate (Ctrl+D), and snapping to clip edges/playhead while dragging and
trimming. Dragging also no longer accelerates - it applied a delta measured
from the drag origin against the clip's live position on every pointer event.

Escapes project/asset names interpolated into innerHTML. AI project names are
now the user's prompt verbatim, and this is a desktop webview, so injected
markup would run with the app's privileges.

Removes the Dev Mode toggle; devMode still reads from localStorage so the
devtools drawer stays reachable for developers.
@PeytonLi PeytonLi added the feat label Aug 13, 2026
@jrb00013

Copy link
Copy Markdown
Member

/sorge

@deepiri-sorge

deepiri-sorge Bot commented Aug 14, 2026

Copy link
Copy Markdown

Sorge AI Code Review

Status: Temporarily unavailable — providers exhausted

Deferral class: providers_exhausted


What happened

Review deferred — mixed provider issues (soft Gemini quota and/or HTTP 429 and/or truncated responses). No automated review was generated — this is not a code-quality score. Approximate retry window: ~2 minute(s).

What to do

  • Wait ~2 minute(s), then comment /sorge
  • Check routing details below for soft_quota vs http_429 vs vacuous/truncated

Retry in ~2 minute(s)

Routing details
  • Soft RPD: gemini 1/20, gpt 0/1000, openrouter 0/50
  • Stop: providers_exhausted

No quality score was computed — this is not a code review result.

Review deferred by deepiri-sorge

@jrb00013
jrb00013 requested a review from ElgineTham August 14, 2026 12:24
@jrb00013

Copy link
Copy Markdown
Member

Sorge AI Code Review

Status: Temporarily unavailable — providers exhausted

Deferral class: providers_exhausted

What happened

Review deferred — mixed provider issues (soft Gemini quota and/or HTTP 429 and/or truncated responses). No automated review was generated — this is not a code-quality score. Approximate retry window: ~2 minute(s).

What to do

  • Wait ~2 minute(s), then comment /sorge
  • Check routing details below for soft_quota vs http_429 vs vacuous/truncated

Retry in ~2 minute(s)

Routing details

  • Soft RPD: gemini 1/20, gpt 0/1000, openrouter 0/50
  • Stop: providers_exhausted

No quality score was computed — this is not a code review result.

Review deferred by deepiri-sorge

@nhuynh30 wtf happened? Fix and figure out. May have to update model provider models, keys, or switch off to alternate providers

@nhuynh30

Copy link
Copy Markdown
Contributor

I dug into the Sorge issue and found the main cause. It’s not a key or quota problem. The problem is that several reviews were triggered within a few minutes of each other, so they were competing for the same concurrency lock that we use to prevent multiple runs from hitting the free-tier providers at the same time.

For example, if Review A gets the lock, Review B can’t get it while A is running. Right now, B treats losing the lock as if all providers are exhausted and exits immediately. It doesn't actually call Gemini, GPT, or OpenRouter, which is why those failed runs show zero provider dispatches. The 120-second retry budget is also never used.

I’m going to fix this so losing the lock causes the scheduler to wait briefly and retry instead of immediately failing. It will keep retrying within the existing retry window until the lock becomes available. I’ll also separate lock contention from providers_exhausted so we don't report the wrong failure reason.

On top of that, I found the Cloudflare Worker hasn't been deployed since July 31, two OpenRouter models are broken, and Groq's 7k context limit is too small for our typical 13–19k token PRs.

I'll handle the retry logic, model cleanup, and concurrency guard. The Cloudflare Worker still needs to be deployed by whoever has Cloudflare access.

@jrb00013

Copy link
Copy Markdown
Member

@nhuynh30 make sure it's fixed sir


/sorge

@ElgineTham ElgineTham left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently holding merge here, because it relies on the changes in #91. I've requested changes there, so it should update here as well. The rest of the changes in this PR looks good and ready to be approved!

@nhuynh30

Copy link
Copy Markdown
Contributor

@nhuynh30 make sure it's fixed sir

/sorge

i alr pushed a fix on sorge pr 100 and it is already merged. should be good now

@jrb00013

Copy link
Copy Markdown
Member

@PeytonLi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants