Skip to content

Studio follows the film's files and opens a stop on what it asks about - #241

Merged
ZLHad merged 12 commits into
mainfrom
claude/studio-window-follows-files
Nov 23, 2026
Merged

ZLHad merged 12 commits into
mainfrom
claude/studio-window-follows-files

Conversation

@ZLHad

@ZLHad ZLHad commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

Follows #240 (the hand-over, landed on main as dd4f75f): main is merged in, so this diff is only the window's part. Fixes A4, A5 and B4 of the first-film review, and the eight items of this PR's independent review.

What the person saw

  • The window kept a 9-part outline the agent had already cut to 7, and the script's first version after its fourth. A reload jumped to another page.
  • Four stops in six opened on the wrong page: the outline re-review on 立意, the script stop on the 大纲 tab.
  • Clicking 字幕 / 旁白 put the stop's explanations above it and pushed the script far down.

Reproduced on a made-up film before the change:

  • the BRIEF cut from 3 parts to 2, and 10 s later the window still showed 3;
  • after the window followed a new page by itself, the address still named the old module, so clicking it in the left rail did nothing and a reload landed elsewhere;
  • the 1b page opened on 成片 or 立意;
  • the tab row went from 174 px to 575 px down the page when the script tab was clicked.

What changed

  • tools/desk/server.py
    • files_stamp: the mtime and size of what the page is drawn from (the documents, shots.json, edit.json, the review pages, .current, and the narration's timing audio/timeline.<lang>.json, out/edit.timeline.<lang>.json), in the status poll and the data.
    • The data's files_stamp and notes_stamp are taken before the film is read: a file written during the read leaves the page one reload behind, never stale for good.
    • The status poll's round comes from the same place as the page's rounds (current_round, the readable pages only): a page half-written is not a new round, so the window neither follows it nor says anything.
    • Not in the stamp: what the cut module reads from a render (the shots inside a rendered film, thumbnails, peaks, the latest check). A page open during a render shows those after its next reload.
  • tools/desk/static/studio.js
    • Follows the files. When the stamp moves, the page reads the film again in place: same module, tab, scroll (put back once the stop's page part below has loaded, so the page has its height), playhead and drafts, with a quiet "文件改了,这里换成了新的一版". It waits while the person is typing (a text box with a keystroke or an input-method composition in the last 30 s), the send sheet is open, or the film plays. A radio button picked, or a text box focused and idle for 30 s, does not hold it back.
    • Notes carry what they were written on: an outline part's title and words, a script line's words, a shot's words. After the files change, each kept note:
      • same content at the same place: stays;
      • same content at another place: goes there, takes its new number and time, and says once "(原来是第 3 段)";
      • content at its place changed and nowhere else (renamed, rewritten): never drawn on what took its place, no time, goes nowhere on a click, says "(这一处后来改了)" (and what it was written on when its label does not already name it), keep or delete; sent the same way, under a target no tool maps onto the new occupant;
      • its place gone: "(这一处已经不在了)", as before.
        Putting the files back puts every note back where it was written.
    • Opens a stop on what it asks about (stopMod, stopSub): a gate ① page with no concept cards (1b, an outline-only gate ①) on the outline, with its question in the column; E1 on the outline's script tab; the rest as before. A gate ① card counts as a concept card when it has a frame, as the repo's rule for concept cards says; one without opens on the outline.
    • A new page from the agent. Followed only when the person is not mid-typing and the sheet is closed. When the person went where they are by their own choice (a link, the rail, Back), the window stays there, reads the film again, and says "大纲那一页出来了"; the line at the top of the column offers the way there ("去看大纲"). A page the window follows to gets a history entry of its own (pushState), so Back returns.
    • The address names what is on screen. A module the page picked itself is written into the address (replaceState), so a rail click after a follow works and a reload stays.
    • The tab stays where it was. On a module's other tabs the stop's page keeps a summary above the tabs, at most two lines; a longer one is also there whole with the rest of the page. The rest (decided, delegated, appendices, not looked at, the static page) comes after the tab's content.
  • core.js: new keys only (ho_files, ho_gone, ho_changed, ho_changed_here, ho_moved_seg, ho_moved, ho_newpage); existing strings unchanged.
  • tools/desk/README.md: the page reads the files again, notes and what they were written on, where a stop opens, files_stamp, the page checks.

Checks that fail without it

Page checks in tools/desk/test_page.py; each new one fails on #240's code alone, and the waits are conditions, not fixed times:

  • where a stop opens (1b on the outline with its question in the column; E1 on the script tab), and the address after;
  • the follow to a new page with a history entry and Back; a person who went elsewhere stays there and is told;
  • a gate page half-written: at most one quiet reload, no "new page";
  • a file written between the stamp and the read: one more reload, never stale;
  • scrolled to the bottom of the script, an unrelated file change: same place (±2 px). On Studio hand-over: every note is not sent, sent and not picked up, or picked up; nothing a person submits is lost #240's code the page jumped from 1701 to 1292;
  • busy is typing, not focus: a picked radio does not hold the page; a keystroke just now does, and lets go after 30 s idle;
  • a 400-character summary: two lines above the tabs, whole below;
  • the tab row not pushed down, the rest after the content (Studio hand-over: every note is not sent, sent and not picked up, or picked up; nothing a person submits is lost #240's code: 174 px → 575 px);
  • an outline of nine parts rewritten to five (one removed in the middle, two reordered, one renamed, one's words rewritten), notes on six parts: each stays, follows with its new number and time, says its place changed (not drawn, no click, sent saying so), or says it is gone.

With #240's page checks and #239's cut-page check, all pass together on this head. Full local tools/ci.sh --committed green on the head.

Looked at by eye

On an isolated desk with made-up films:

  • the nine → five rewrite above, notes typed in the column's note box, in Chinese and English, at 1440×900 and 1280×720: the outline shows five parts with notes marked on 1, 2 and 4 only; the column lists 开场 unchanged, 转一圈 at part 2 with 0:04 and "原来是第 3 段", 收尾 at part 4 with 0:12 and "原来是第 9 段", 月亮 and 太阳 "这一处后来改了" without a time, 小潮 "这一处已经不在了"; the "文件改了" toast; putting the nine parts back restored every note;
  • the outline re-review opening on 大纲 with "大纲能做分镜了吗?" in the column;
  • the script stop opening on 字幕 / 旁白, the script right under the tabs, the stop's explanations at the end.

Not looked at

  • The Electron window (a browser only).
  • Phone width.
  • A long real script or film (only small made-up films).
  • A rewritten script or shot list by eye (the same code as the outline; the page checks cover the outline).
  • The top flow bar still lights 立意 "等你看" for a 1b outline page, because it maps stops to modules by number. The column's head names the round by its stop ("这一站 · 立意"). Both are existing strings and lamps, left for the word-table round.

ZLHad added 10 commits November 23, 2026 16:01
…picked up; nothing a person submits is lost

The first real film lost a batch of 12 notes written after their round had been taken, showed "正在取" while nobody would
take anything, and let one storyboard submission end the outline re-review's wait too.

- feedback.py: .consumed records who took what (when, which run, which agent program); a wait claims under the lock, so
  two waits never both hand one submission over; a wait is for one round and ends (exit 7) when its page is no longer
  out; it first hands over every submission nobody took or answered, of any round, a later batch said as such; the
  default wait is 12 h (was 7100 s).
- status.py: notes nobody took come before any other next step (review.unread, an "unread:" line); a later page of a
  decided gate ① (1b) waits for the person; holder says which agent program holds the film and whether outside Studio.
- standing.py: "正在取" only for a live wait on the round that is out; notes_late / notes_left say who picks notes up;
  an agent outside Studio's window is named, with a second AI here only as a confirmed second line.
- Studio: the notes block shows each note's state, pinned above the note box; a taken round's new notes go as a later
  batch ("补交"), said before and after sending; "先改" with no note asks once; the conversation tab asks before it
  starts a second AI on a film an outside agent holds.
- Checks: replays of the lost batch, one submission ending two waits, two waits on one note, a timeout leaving notes,
  the outside agent (test_agents.py handoff); the page in a headless Chrome (test_page.py, page_driver.mjs).
…s out the outside-agent line (the agent reading it is that agent); unread counts only submissions as Studio saves them; the output schemas name the new codes and fields; the notes block's edge uses a theme colour
…each whole-film note its own once the note box keeps several); the agent column's check for adapters left behind looks only at its own desk's process tree, never by name, so two runs of the checks on one machine don't trip each other
The first real film's window kept a 9-part outline the agent had already cut to 7 and the script's first version
after its fourth; a reload jumped to another page; four stops in six opened on the wrong page; clicking the script
tab put the stop's explanations above it and pushed what was reviewed far down.

- server.py: files_stamp (the documents, shot and edit lists, review pages, .current) in the status poll and the data.
- studio.js: the page reloads in place when the stamp moves (module, tab, scroll, playhead and drafts kept; not
  while the person types, the send sheet is open or the film plays) and says so; a draft on a place that is gone
  says so.
- A stop opens on what it asks about (stopMod / stopSub): a gate ① page with no concept cards on the outline, E1 on
  the outline's script tab; used by the gate route, the first open, the follow, the column and stopPage.
- A module the page picked itself is written into the address (replaceState): rail clicks work after a follow, a
  reload stays.
- The stop's page on a module tab: its summary above the tabs, the rest after the tab's content.
- test_page.py: four page checks (where a stop opens, the follow and reload, the outline rewritten while open, the
  tab row), each failing on the hand-over PR's code alone.
…otes block holds from 1280x720; A10 asks only when the page says so

- feedback.py: a hand-over is two steps. claim() writes an unconfirmed claim (pid, when) under the lock; the note is
  written and flushed; only then confirm() makes it taken. A claim whose process is gone is no claim; a signal releases
  this process's claims; a closed or broken output releases them and ends the wait with 74. unread() counts every
  unconfirmed note; taken() only confirmed ones. A wait started orphaned hands nothing over. New submissions are looked
  at before the page-changed check, so exit 7's "nothing was submitted" is true. "late" needs a hand-over recorded by
  this version. One WAIT constant for desk wait and gate --wait.
- status.py: the stop's row and next: name one command, bin/vh desk wait.
- standing.py, agent.js, core.js: an outside agent is "open" on the film, never said to be working.
- Studio: the column is two parts, what to decide scrolling above and the notes block below (at most half the column),
  so the block holds from 1280x720 in every theme and in English; drafts on a page the agent replaced are listed as not
  sent and go to that page's own round, or are dropped, on the person's click; A10 asks only for an option with
  needs_note (gate --init writes it on gate 3's FIX), documented with the gate JSON.
- Checks: a wait killed in the claim-to-write gap (KILL, TERM, INT) and one with a closed output leave the note unread;
  two waits held at the claim and released together hand it over once (fails without the lock); the layout at both
  sizes, three themes, English; drafts of a replaced page; "no change" options never ask; the page check stops its
  own desk's process tree; the handoff group ends the stand-in it builds.
- playbook 01 and the skill: on return, bin/vh status, then bin/vh desk wait; what to do when the host ended a wait.
…-window-follows-files

# Conflicts:
#	tools/desk/static/core.js
#	tools/desk/static/studio.css
#	tools/desk/test_page.py
…r-trust-59e5a0

# Conflicts:
#	tools/desk/static/studio.js
…-window-follows-files

# Conflicts:
#	tools/desk/static/studio.js
… a lock that is gone as naming nothing (GitHub's macOS runner: the turn ended between the look and the read)
Base automatically changed from claude/studio-handover-trust-59e5a0 to main November 23, 2026 11:30
…s the hand-over PR's last head, which this branch already holds
… it, the stamps are taken before the read, and a new page waits for typing

- A kept note remembers its place's words (an outline part's title and words, a script line, a shot). After the files change it stays, goes where its content went (new number and time, "原来是第 3 段" once), or says its place changed (never drawn on what took it, no click, sent saying so) or is gone; putting the files back puts it back.
- files_stamp and notes_stamp are taken before the film is read; the narration's timing is in the stamp; the status poll's round is the readable pages' own.
- The scroll comes back after the stop's page part has loaded; busy is a text box typed in within 30 s, not focus; a new page is followed only when the person did not go elsewhere by choice (then a toast and the column's way there), with a history entry of its own.
- A stop's summary above the tabs keeps to two lines, whole below.
- New page checks for each, with conditions instead of fixed waits.
@ZLHad
ZLHad marked this pull request as ready for review November 23, 2026 12:47
@ZLHad
ZLHad enabled auto-merge (squash) November 23, 2026 12:47
@ZLHad
ZLHad merged commit 77912d1 into main Nov 23, 2026
4 checks passed
@ZLHad
ZLHad deleted the claude/studio-window-follows-files branch November 23, 2026 13:12
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