AI media harness for planning, generating, and editing locally
TypeScript
Line up the list-mode import row and widen the track column
Bitti5a1255592ccb
diff --git a/src/components/ProjectWorkspace.test.ts b/src/components/ProjectWorkspace.test.tsindex 1cbf985..d957f05 100644--- a/src/components/ProjectWorkspace.test.ts+++ b/src/components/ProjectWorkspace.test.ts@@ -226,6 +226,36 @@ describe("project workspace timecode", () => {expect(rejected()).toHaveLength(0);});+ it("keeps the transport on the timeline, with one timecode and one reason", () => {+ const empty = createProjectConfig({ name: "Ceramic lamp", prompt: "A quiet product film", aspectRatio: "16:9", resolution: "1080p", targetDurationSeconds: 30 });+ const { container, rerender } = render(createElement(TimelineView, { config: empty, folderPath: "C:\Ceramic Lamp", onChange: () => undefined, onOpenGenerator: () => undefined }));++ // It sits in the timeline toolbar now, not under the program monitor.+ expect(container.querySelector(".monitor-transport")).toBeNull();+ expect(container.querySelector(".timeline-toolbar .timeline-transport")).not.toBeNull();+ // the playhead time is printed once. The toolbar used to print it beside+ // the heading while the monitor printed it again, which reads as two clocks.+ expect(container.textContent!.match(/\d\d:\d\d:\d\d:\d\d/g)).toHaveLength(1);+ expect(container.querySelector(".transport-format")!.textContent).toBe("1080P · 30 fps");++ // An empty timeline has nothing to play, and every control says so rather+ // than only going grey.+ for (const label of ["Go to beginning", "Play", "Step forward one second"]) {+ const button = screen.getByRole("button", { name: label }) as HTMLButtonElement;+ expect(button.disabled, label).toBe(true);+ expect(button.title, label).toBe("Nothing to play yet — add or generate a scene first.");+ }++ // With a clip on the timeline they come alive, and Space still plays.+ const config = parseProjectConfig(completeFixture);+ rerender(createElement(TimelineView, { config, folderPath: "C:\Ceramic Lamp", onChange: () => undefined, onOpenGenerator: () => undefined }));+ expect((screen.getByRole("button", { name: "Play" }) as HTMLButtonElement).disabled).toBe(false);+ fireEvent.keyDown(container.querySelector(".timeline-view")!, { code: "Space" });+ expect(screen.getByRole("button", { name: "Pause" })).not.toBeNull();+ fireEvent.click(screen.getByRole("button", { name: "Pause" }));+ expect(screen.getByRole("button", { name: "Play" })).not.toBeNull();+ });+it("does not delete a selected clip from a locked track", () => {const config = parseProjectConfig(completeFixture);const firstTrackWithClip = config.timeline.tracks.find((track) => track.clips.length > 0)!;diff --git a/src/styles/timeline.css b/src/styles/timeline.cssindex a648403..c1fd462 100644--- a/src/styles/timeline.css+++ b/src/styles/timeline.css@@ -445,18 +445,36 @@}/* In list mode the import control is one row like every other, not the tall- dashed plate the grid needs. These have the same specificity as the grid- rules above, so they MUST stay below them — moved up, the 120px plate won. */+ dashed plate the grid needs — and not a centred label either: it reuses the+ row grid above, so its words start on the same pixel as every file name+ beside it and its icon sits in the same column as their stills. These have+ the same specificity as the grid rules above, so they MUST stay below them —+ moved up, the 120px plate won. */.media-grid--list .media-import {- min-height: var(--space-7);- flex-direction: row;- gap: var(--space-2);- padding: 0 var(--space-2);+ /* The rows beside it are 42px tall: a 40px still between two 1px borders.+ This row carries the same border, so it has to add the same two pixels. */+ min-height: calc(var(--space-7) + 2px);+ display: grid;+ align-items: center;+ /* The grid-mode plate packs its icon and label together; a row uses the same+ column gap as the file rows, or the name lands four pixels short of theirs. */+ column-gap: var(--space-2);+ padding: 0;+}++.media-grid--list .media-import svg {+ justify-self: center;}+/* The file rows push their name down onto the baseline of a two-line stack.+ This row has one line, so it centres instead — bottom-aligned, it sat ten+ pixels below its own icon. */.media-grid--list .media-import b {width: auto;+ margin-top: 0;+ padding-left: 0;text-align: left;+ align-self: center;}/* --- Program monitor ------------------------------------------------------- */@@ -868,7 +886,10 @@/* --- Track grid ------------------------------------------------------------ */.timeline-grid {- --track-column: 224px;+ /* Wide enough for the seeded track names ("Track 1, Video") to be read in+ full. At 224px the rename field clipped them to "Track 1, Vi...", which+ reads as a broken name rather than a narrow column. */+ --track-column: 256px;position: relative;display: grid;grid-template-columns: var(--track-column) minmax(0, 1fr);