Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions changes/studio-window-follows-files.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
**Studio 的窗口跟着文件走:agent 改了大纲、文案,窗口自己换成新的一版;一站开在它要审的东西上**
- Why: 第一支真片子里,人对着已经不存在的 9 段大纲写意见,文案改到第四版窗口还是第一版,要按"显示 → 重新载入",重新载入又跳回别的页;六次开站有四次停错页(大纲复审停在立意,文案停在大纲页签);点下面的"字幕 / 旁白",内容却在上面展开,要审的旁白被挤到很下面。
- agent 改了片子的文件(BRIEF、SCRIPT、NOTES、DECISIONS、REVIEW、镜头表、剪辑表、审阅页、旁白的时间),开着的 Studio 几秒内自己换成新的,停在原来的模块、页签和位置,说一句"文件改了,这里换成了新的一版";人正在打字(30 秒内敲过键)、交之前的那一页开着、片子在放时先不换,选了一个选项不算在打字。
- 写了还没交的意见记着它写在什么上(大纲一段的名字和话、旁白的那一句、镜头的话)。agent 改了大纲:同样的那一段挪了位置,意见跟着走、换成新的段号和时间,说一次"原来是第 3 段";那一段改了名或改了话,意见不再画在占了原处的新段上,写明它写的时候对着什么、"这一处后来改了",交给 agent 时也这样写;删掉了,写明"这一处已经不在了"。
- 一站开在它要问的东西上:立意定了以后再发的大纲(1b)、没有立意卡的关卡 ① 开在大纲上,要定的事在右栏;文案(E1)开在大纲的"字幕 / 旁白"页签上。
- 窗口自己挑的模块写进地址:左边点同一个模块不再没反应,重新载入也停在原处。agent 发来新的一页:人自己走到别处的,留在那里,说一句"大纲那一页出来了",右栏顶上有去那一页的按钮;Studio 自己开着的,跟过去,后退能回来。写到一半、读不出来的审阅页不算新的一页,页面不再来回跳。
- 关卡页的说明(已经定了的、替你定的、附录、没看没听的)放到页签内容的下面,页签上面只留摘要(最多两行,长的整句在下面):点哪个页签,要审的东西都在页签下面紧挨着。
8 changes: 4 additions & 4 deletions tools/desk/README.md

Large diffs are not rendered by default.

32 changes: 28 additions & 4 deletions tools/desk/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -660,12 +660,36 @@ def _drop_missing(project, d, key):
d[key], d[key + "_missing"] = "", v


def files_stamp(project):
"""A stamp of the files the page is drawn from: the project's documents (reader.DOCS), its shot list and edit list, its
review pages and which one is this round, and the narration's timing (audio/timeline.<lang>.json, out/edit.timeline.<lang>.json).
It changes when the agent writes one of them, and an open page then reads the film again. Renders, frames and other media do
not change it, nor does 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."""
project = Path(project)
paths = [project / n for n in list(reader.DOCS) + ["shots.json", "edit.json"]] + [project / "out" / "review" / ".current"]
try:
paths += sorted((project / "out" / "review").glob("gate-*.json"))
paths += sorted((project / "audio").glob("timeline.*.json")) + sorted((project / "out").glob("edit.timeline.*.json")) # the narration's timing (a voice-over done again)
except OSError:
pass
h = hashlib.sha1()
for p in paths:
try:
st = p.stat()
h.update(f"{p.name}:{st.st_mtime_ns}:{st.st_size};".encode())
except OSError:
h.update(f"{p.name}:-;".encode())
return h.hexdigest()[:16]


def project_data(project, parts=("studio", "mods")):
"""A project's data as the console reads it (GET /api/p/<key>/data, less the key): reader.read_project, bin/vh status,
the folder's identity, this round and whether it is open, and the parts asked for, what the cut module lays out (studio)
and what the other modules read (mods). A static review page asks for what its stop's modules need (tools/review.py).
Raises what read_project raises; a part that cannot be read is null, the reason in warnings."""
revision_stamp = RV.stamp(project)
stamps = F.notes_stamp(project), files_stamp(project) # before the read: a file written during it leaves the page one reload behind, never stale for good
data = reader.read_project(project)
try:
import status as S
Expand All @@ -690,7 +714,7 @@ def project_data(project, parts=("studio", "mods")):
fb["state"] = "taken" if t is not None else "unread" if n in un else "answered"
fb["taken"] = {"t": t.get("t"), "program": t.get("program"), "by": t.get("by")} if t is not None else None
fb["late"] = bool(un.get(n))
data["notes_stamp"] = F.notes_stamp(project)
data["notes_stamp"], data["files_stamp"] = stamps
_drop_missing(project, data.get("shots"), "video") # the storyboard's animatic, and the pictures the gate pages name
for r in data.get("rounds") or []:
g = r.get("data") if isinstance(r, dict) and isinstance(r.get("data"), dict) else {}
Expand Down Expand Up @@ -1128,18 +1152,18 @@ def do_GET(self):
if what == "data":
return self._data(project, key)
if what == "status": # with this round's page: the console notices a new page the agent sent; and where the film stands now
pages = review.gate_pages(project)
try:
import status as S
o = S.collect(project, light=True)
now, plan = o.get("now"), o.get("plan")
except (Exception, SystemExit): # the page keeps what it has
now = plan = None
lis = F.listening(project)
cur = pages[-1].stem[5:] if pages else None
cur = F.current_round(project) # (the readable pages only, as the page's own rounds: a page half-written is not a new round)
cur = None if cur == F.NO_ROUND else cur
return self._json(dict(lis, project=project.name, key=key, round=cur, revision_stamp=RV.stamp(project), now=now, plan=plan,
live=bool(lis.get("listening")) and lis.get("round") is not None and lis.get("round") == F.current_round(project),
notes_stamp=F.notes_stamp(project)))
notes_stamp=F.notes_stamp(project), files_stamp=files_stamp(project)))
if what == "stage":
return self._stage(project, key)
lang = (parse_qs(urlsplit(self.path).query).get("lang") or [None])[0]
Expand Down
6 changes: 6 additions & 0 deletions tools/desk/static/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@ const STR = {
ho_fix_q: "你选了“{x}”,还没写改哪里。", ho_fix_b: "在页面上点要改的地方写一句,或者在上面的整体意见里写。", ho_fix_back: "回去写", ho_fix_go: "就这样交",
ho_s_1: "立意", ho_s_outline: "大纲", ho_s_E0: "画风样张", ho_s_E1: "旁白稿", ho_s_2: "分镜", ho_s_E2: "配乐安排", ho_s_E3: "最终的声音",
ho_s_3: "初版", ho_s_E4: "第一章样片", ho_s_E5: "定画面的版本", ho_s_notes: "随手写的意见", ho_s_other: "这一页",
ho_files: "文件改了,这里换成了新的一版", ho_gone: "(这一处已经不在了)",
ho_changed: "(写的时候对着「{x}」,这一处后来改了)", ho_newpage: "{s}那一页出来了", ho_moved_seg: "(原来是第 {i} 段)", ho_moved: "(原来是 {i})",
ho_changed_here: "(这一处后来改了)",
ho_left: "在{s}那一页写的 {n} 条,还没交", ho_left_b: "那一页已经换成了新的一页。这几条不会自己交出去,也不算进现在这一页。",
ho_left_send: "交到{s}那一轮", ho_left_drop: "不要了", ho_left_fail: "没有交成功,这几条还留在这里。",
},
Expand Down Expand Up @@ -345,6 +348,9 @@ const STR = {
ho_fix_q: "You picked “{x}” but haven't said what to change.", ho_fix_b: "Click the place to change on the page and write a line, or write it in the overall box above.", ho_fix_back: "Go back and write it", ho_fix_go: "Send as it is",
ho_s_1: "the concept", ho_s_outline: "the outline", ho_s_E0: "the style frames", ho_s_E1: "the script", ho_s_2: "the storyboard", ho_s_E2: "the sound plan", ho_s_E3: "the final sound",
ho_s_3: "the first draft", ho_s_E4: "the first chapter", ho_s_E5: "the picture lock", ho_s_notes: "your loose notes", ho_s_other: "this page",
ho_files: "The files changed; this shows the new version", ho_gone: " (no longer there)",
ho_changed: " (written on “{x}”; this place has changed since)", ho_newpage: "A new page is out: {s}", ho_moved_seg: " (was part {i})", ho_moved: " (was {i})",
ho_changed_here: " (changed since you wrote this)",
ho_left: "{n} {n|note|notes} written on {s}, not sent", ho_left_b: "A new page has replaced that one. These do not go by themselves, and they are not counted with this page.",
ho_left_send: "Send them with {s}", ho_left_drop: "Drop them", ho_left_fail: "Not sent; they are still here.",
},
Expand Down
3 changes: 3 additions & 0 deletions tools/desk/static/studio.css
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,9 @@ html.shell-other .topbar{padding-right:calc(14px + 100vw - env(titlebar-area-x,
.col-body .c-mine .blk-h{position:sticky;top:-10px;margin:-10px 0 4px;padding:10px 0 4px;background:var(--panel);z-index:1} /* the state line stays while the notes scroll */
.col-body .c-mine .blk-h .tag{margin-left:auto;color:var(--wait)}
.col-body .ho-batch{margin-top:8px}
.col-body .note-list em.gone{font-style:normal;color:var(--wait);margin-left:4px}
.col-body .note-list em.moved{font-style:normal;color:var(--ink-3);margin-left:4px}
.module .page-sum{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden} /* the stop's summary above the tabs: two lines at most, whole below */
.col-body .ho-st.left i{background:var(--you)}
.col-body .ho-acts{display:flex;gap:8px;margin:4px 0 0 14px}
.col-body .ho-st{margin:0;display:flex;gap:8px;align-items:baseline;font-size:var(--fs-small);color:var(--ink-hi)}
Expand Down
Loading
Loading