Repository navigation
Conversation
Watching and mixing, nothing else: a field ui command serving a local TypeScript client that shows the transport and the song's tracks, with fader moves landing as gain_db written through the same comment-preserving machinery every tool uses — files stay the source of truth, the daemon stays musically ignorant, and plugin editors stay chunk 3's native windows, launched rather than embedded. The bridge is field itself: the daemon speaks a unix socket a browser cannot, and every write path the UI needs already lives in field's process, so field ui is a thin HTTP/WebSocket layer over what exists. Draft: §5 carries the questions to discuss before anything is built, React-versus-Next.js first among them, with the leaning recorded (Vite + React SPA — Next's server half duplicates a server field already is) and the counter-case stated fairly.
|
Starting review of 4409da7. |
minjudd
left a comment
There was a problem hiding this comment.
Reviewed 4409da7 — docs-only, the plan plus the next.md line.
Every citation checks out, and I chased two of them past a first grep that said otherwise, which is worth recording so nobody re-does the work. ramp is a real op — not in protocol.ts where I first looked, but session.ts:247 declares it, server.cpp:271 handles it, and AudiodClient.ramp() at client.ts:221 is exercised in live-session.test.ts. And playback.md does set the rule §2 attributes to it, at lines 76-78: --from <bar.beat.tick> "projects musical time through the tempo map CLI-side and sends locate(samples) — the daemon never learns what a bar is". Worth noting that playback.md states it for locate input while §2 cites it for the readout; the principle is stated generally enough to cover both, so this is an observation rather than a correction.
The rest: state, position and device are all real events in protocol.ts; AudiodClient is the class name; gain_db and pan are both placement fields (track.ts:96,99) with pan bounded −1..1; there is no mute field anywhere in the schema or tracks.md, so "mute is a gain gesture until a mute: field exists" is accurate; automation.md:38 does scope "realtime routing and lane UI" as its own project; add-insert.md §3 does record the full-TUI want beside the disposable-picker decision; plugin-hosting.md §5 chunk 3 and decision 7 say what §2 says they say; and project-core.md §5 is the Stack section. The daemon really does speak AF_UNIX (server.h), so "a browser cannot reach it" is the actual constraint the architecture is built from rather than a convenient framing.
The open questions do not gate this. status: Draft claims no readiness, so all six of §5 — React versus Next.js, browser versus shell, where the client lives, fader drags, whether the full-TUI want retires, styling — withhold nothing, even though this PR introduces every one of them. The claim they would otherwise gate moves to the PR that flips this to Active, which §5's own preamble already says is the one that answers them.
The finding below is not one of those. It is a description of an existing (DECIDED) record, and Draft exempts unanswered questions rather than inaccurate statements about settled ones — the more so because AGENTS.md treats decision records as the thing not to diverge from quietly. It is small and it is the only one.
Justin's answers on the plan's first questions: Vite + React SPA — Next's server half duplicates a server field already is, and the remote story points the same way, since the elements that eventually serve audiofield.io get pulled out into that product later rather than carried as a framework now. Local first, confirmed. And the full TUI is wanted outright, later: it coexists with this UI rather than being retired by it, so the want moves from a clause inside the disposable-picker decision to its own line on later.md.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4409da7ab3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Starting review of 50ffbd3. |
minjudd on #156: the bullet said chunk 3 keeps gestures file-only until release, which is decision 7 backwards — the live chain applies values immediately, you hear the knob now, and the file write is the one thing that waits. Read accurately the decision pulls toward live ramps rather than against them, and what chunk 3 actually lacks is a socket op inside the gesture — its editor lives in the daemon, audible without crossing the socket, where a browser fader is on the far side of one. The question now poses the real trade: throttled socket traffic against an audible fader, with the file write landing once on release either way.
|
Starting review of 1067f78. |
minjudd
left a comment
There was a problem hiding this comment.
Reviewed 1067f78. Two heads landed while I was reading 50ffbd3, so this covers both — the stack settlements and the fader rewrite.
My P3 is answered, and answered better than I suggested. The bullet now states decision 7's principle in its own words — the live chain applies values immediately, you hear the knob now, and only the file write waits for release — and then draws the conclusion I was reaching for rather than the one the old phrasing implied: hearing the move is decision 7's own principle, chunk 3 has no socket op only because its editor lives in the daemon, and a browser fader is on the far side of one. "The trade is throttled socket traffic against an audible fader" is the honest statement of the question, where the old version made it sound like fidelity-to-chunk-3 versus convenience. I checked it against decision 7 again and it now matches word for word on the part it quotes. My thread is outdated and unresolved; leaving it for you.
The two settlements follow the house convention. Vite + React names what Next would have bought and why the localhost case does not need it, and — the part that makes it a decision rather than a preference — it handles its own counter-case: the remote story exists and points the same way, with components extracted into audiofield.io later instead of a framework carried now for a site that does not exist. The TUI settlement is the more interesting one, because it resolves the question by promoting it: wanted outright, its own line on later.md, and add-insert.md §3's disposable pickers named as the placeholder it replaces. That is consistent with what §3 says — "a full TUI is eventually wanted, and that is its own stack decision to record against project-core.md §5 when it arrives" — and the later.md line repeats the project-core.md §5 obligation rather than dropping it.
The goal line moved to "on Vite + React (§5)" in step, and the other three §5 references still resolve to what they claim.
One P3 below, introduced across these two commits, and it is the only thing outstanding from me.
Still exempt as a plan: status: Draft claims no readiness, so the four questions still open in §5 — browser versus shell, where the client lives, fader drags, styling — withhold nothing. The finding below is not one of them; it is prose about the list rather than a question in it.
Seven Codex findings and a minjudd P3, all verified against the code they cite before writing. field ui takes the song argument field play's grammar already defines (bloom carries two songs). Mute joins the non-goals until a mute: field exists — a gain gesture destroys the authored level, and remembering it anywhere but the file is the second store §2 forbids. The WebSocket gains its two required guards: Origin plus a per-session token (localhost excludes the network, not other pages a browser runs), and edit ops carry the content hash they were derived from, stale writes rejected and refreshed — optional placement ids mean a racing write cannot always re-anchor by name. Transport state seeds from status() and devices() with events layered on top, since position flows only while playing and device names only the selected output. The fader-drag question now carries its two bounding facts: the ramp verb reaches exactly the output track's input gains (diffSessions masks by position for that reason), and an interrupted gesture needs specified rollback where chunk 3 has owner acks and the bare ramp op has no transaction. §5's preamble counts its settlements instead of pointing at an ordinal that moves.
|
Starting review of a321ca8. |
minjudd
left a comment
There was a problem hiding this comment.
Approving a321ca8.
My P3 is fixed, including the part I only gestured at. The preamble now reads "two are settled inline and dated; the rest are the flip-to-Active PR's to answer, however many remain when it opens — counted then, not here, so the next settlement does not stale this line." That closes the self-staling problem rather than just correcting today's count, which was the actual complaint.
The rest of the round answers Codex, and I verified its technical claims independently rather than assuming a fix is right because it is a fix.
The events-are-not-truth point is exactly right, and stronger than the plan needed to claim. main.cpp:97-100 broadcasts position inside if (state == "playing"), so a locate while paused really does emit nothing — seeding from status() and re-querying after each op is not belt-and-braces, it is the only way the readout is ever correct while stopped. client.status() and client.devices() both exist (client.ts:243 and 203), and device does carry a single selected name, so re-querying devices() for the picker's list rather than waiting for an event is correct too.
The ramp-reach paragraph is the best thing in this diff, and it checks out line for line. diffSessions at live.ts:465 masks the output track's input gains by position, and its own comment says why in the same terms the plan now uses: "every other track pre-renders at load with its gains baked into the buffers, so a ramp there would report success and change nothing." The consequence the plan draws from it — a live drag is audible for output-track placements only, a nested fader lands on release regardless, and "moving faders that change nothing are worse than none, so the control must say which kind it is" — is a real design constraint that a UI would otherwise discover from a user. Pairing it with the interruption case is the right instinct: chunk 3 does hold gestures until the owner acknowledges and rolls back on detach (decision 7), and the bare ramp op has no such transaction, so a tab close mid-drag is a genuinely unsolved half of that option rather than an edge case.
The mute reversal is the right call for the reason given — spelling it as a gain gesture would overwrite the authored level, and remembering the old value anywhere but the file is the second store §2 forbids. field ui <song> is right too: bloom carries creek and tall-grass, so there is nothing to guess from. Placement ids are indeed slug.optional() (track.ts:74), which is the half of "cannot always be re-anchored by name" that carries the argument for the content-hash guard.
Still exempt as a plan. status: Draft claims no readiness, so the four questions still open in §5 — browser versus shell, where the client lives, fader drags, styling — withhold nothing. The PR that flips this to Active answers for whatever remains then, and §4 already names the other obligation that rides it: the Vite + React addition recorded against project-core.md §5.
One clause not worth a round: §1 still says "open the UI on a project", which §4's field ui <song> narrows. It reads fine because the next words are "see the song playing", so this is only worth folding into the next edit that touches §1.
Brings the UI up to date with its parent, which now carries main: the Projector layout, recording chunks 1-4, and the remote. Docs, moved to the Projector layout (#164): - docs/projects/all/ui.md becomes docs/projects/ui/readme.md, where main already carried #156's plan. A three-way merge against #156's original keeps this branch's implementation and main's wording changes; the frontmatter is status: in-progress, priority: now, which is what this branch's Active flip and its now.md line said. - docs/projects/all/daw-features.md becomes docs/projects/daw-features/readme.md with status: draft and priority: later, from its later.md line; "Reference" is not a Projector status. Its links into sibling plans use the ../<name>/readme.md form, and its later.md links point at the projects those lines became (mcp-surface, analysis-workers). The link to ui-timeline.md is unlinked and marked not yet written: no such plan has ever existed, and project check refuses the dead link. - project-core's two amendments link ui.md as ../ui/readme.md. - now.md and later.md are deleted on main; their lines live in frontmatter now. Code, where both sides added a block at the same place: - src/cli.ts keeps this branch's `field ui` and main's `field record`. - src/graph/build.ts keeps this branch's renameOverwrite() and main's fetchAction(). - package.json keeps build:ui beside main's bounded native build with this stack's --config Release.
…s (windows-portability.md §7) (#158) Adds §7 to the [Windows portability plan](../blob/windows/inventory/docs/projects/windows-portability/readme.md): a swept inventory of every remaining Windows item, grouped by where it lands — the committed chunks, findings not yet in any chunk, the workers' own transport decision, and consumers that inherit the port rather than adding to it. Sections append at the end per the docs convention, so nothing renumbers. ## How it was gathered Every spawn site and path literal in `src/` (`grep` over `spawn|execFile|execSync` and absolute-path strings), the daemon sources, the Python workers, and the test surface — cross-checked against what chunks 1 and 2 actually hit when they ran, which is how the labels bug earned its §5 amendment and how three of the items below surfaced. Line citations are pinned to `main` at `4f90a87`. ## The finding worth reading first **`field init` plants chunk 1's defect in every new project** (`commands/init.ts:60`): the `.gitattributes` it writes carries only the seven LFS filter lines — no `* text=auto eol=lf`, no `*.state` override. A project created on or cloned to Windows gets the §1.1 checkout corruption against its own committed `.scd` programs and asset pins, and the engine repo's own fix cannot reach it. #159, open against `main`, makes `init` write both halves, and §7.2 names it. ## Also new - The `field insert add` picker (#155) decodes raw-mode CSI sequences that nobody has run under Windows Terminal/ConPTY — one manual pass needed. - `homeRelative` hardcodes `/` so tilde-shortening never fires on Windows; `defaultExportDir()` misses a OneDrive-redirected Desktop. Warts, not breaks. - `sclang`'s convenience fallback probes `/Applications/…`; PATH and `FIELD_SCLANG` already work everywhere. - The workers' Python end has no named-pipe socket family in CPython, and its `fcntl` import fails on Windows before the socket is reached, so their transport and single-owner lock are a decision of their own, not §2.1 verbatim. - The UI plan (#156) and the unlanded `field open` are consumers of this port, not additions to it — noted so their reviews ask the right question. §7.4 also states chunk 2's rule for separators: a project-relative path is slash-separated wherever it is data, and a path printed for a person keeps the platform's separator. ## Testing The change is one plan file, so the checks read it. Run these from the root of a checkout of `windows/inventory`. They need no build and change nothing in the tree. ```sh project check git diff origin/windows/gitattributes --stat git show 4f90a87:src/commands/init.ts | sed -n '55,72p' git show 4f90a87:python/worker/src/field_worker/server.py | grep -n '^import fcntl\|AF_UNIX' git show 4f90a87:src/workers/client.ts | grep -n 'brew install uv\|pkill -f' ``` `project check` prints `Project plans are valid.` The diff against the base touches only `docs/projects/windows-portability/readme.md`. The `init.ts` lines show the LFS-only `.gitattributes` §7.2 describes, at lines 60 and 71. The `server.py` grep prints line 23 (`import fcntl`) and line 129 (`AF_UNIX`), and the `client.ts` grep prints lines 122, 305, and 345, the citations §7.3 makes. The change is wrong if `project check` reports an error or if any of those greps prints a different line number than §7 cites. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- projector-summary v=1 sha=1283ef807c8d387b511a8114b3d62717bdf9bd81 --> 📽️ **Projector summary** of 1283ef8: https://field.amnes.ac/reviews/158 --------- Co-authored-by: Claude Fable 5 <[email protected]> Co-authored-by: Justin Balthrop <[email protected]>
…es, with mute and solo (#163) Implements the [UI plan](../blob/ui/first/docs/projects/ui/readme.md) — ninjudd's plan from #156, which this diff moves from `status: draft` at `priority: next` to `status: in-progress` at `priority: now`, and amends with a new §6, appended at the end, recording what the implementation settled. `field ui <song>` opens a desktop face on a playing song, and every gesture in it ends as an edit to the project's YAML. §3's first-version scope ships as written, plus the two things the plan was waiting on (**mute exists**, and **solo** arrived as a session-only alternate feed), plus four things §3 listed as non-goals, which §6 now records with the reason each was taken. ## Mute is a field, not a gesture `mute:` on the placement beside `gain_db`/`pan` — the loop entry's `enabled:` shape applied to a whole placement, exactly for §2's reason: a gain gesture would overwrite the authored level, and remembering the old value anywhere but the file is a second store. `planFor` excludes muted placements, so the stem spec, its action key, the deps, and the live session all agree the placement is absent, and its sends go silent with it: a cable whose every sender placement is muted carries nothing. Proven in `build.test.ts` and `cables.test.ts`: a toggle re-keys the stem, **re-muting is a cache hit** (the exclusion is deterministic), a source consumed only by muted placements drops out of the deps, and a muted sender drops out of its receiver. ## Solo is a listening gesture, so it lives with play/pause `model/solo.ts` computes an alternate output feed at session compile and holds it nowhere: the soloed track's subtree whole, its carriers keeping only the inputs that lead to it, its send receivers audible transitively — solo drums, keep the room drums feed. Muted placements cannot carry a solo. While a solo is held the server swaps the soloed compile on every file edit instead of ramping, because ramp indexes address the daemon's session and the soloed session's indexes are not the un-soloed compile's, and a track frozen under the solo is served its soloed stem. ## `field ui <song>` One process — field's own, per §4: compiles the session, connects the daemon, serves the built client, carries one WebSocket per view, bound to `127.0.0.1`. A gesture ends as YAML written through the same comment-preserving `Document` machinery every editor uses, and the **existing watch-live loop** carries it into the playing session; the server never pushes an edit to the daemon itself. Both of §4's guards are in: Origin + per-launch token on the upgrade, and every edit carries the sha256 of the file bytes it was derived from — stale is reject-and-refresh, never write-through. File-writing messages run one at a time, and each edit is loaded as the project would be before it is written, so a gesture that would turn the song red is refused with the error instead. The client is a Vite + React workspace package (`ui/`), hand-rolled CSS, opened in an Electron shell that mirrors the page's console to the terminal, or in a browser with `--browser` or when the shell cannot start. Closing the shell, or ctrl-c, stops the transport and ends the session. Musical time projects in the view: the snapshot carries the song's tempo and meter events, and the client builds the same `TempoMap`/`MeterMap` from `src/time/tempo.ts` to run its playhead between the daemon's 250 ms position events (§6 records why the first, server-side answer was reversed). playback.md §3.6's rule — samples cross the daemon socket, music does not — holds unchanged. ## The timeline, clip edits, and the insert panel - **The timeline.** Lanes draw on one time axis under a bar ruler, with a playhead, using the planner's own `placedWindow`, so the picture cannot disagree with the render. Waveforms are the cheap half §3's argument allows: an envelope computed on demand from the stem the build already wrote, over the slice each placement reads. A lane that places a track opens into the placements in that track's file, each row editing its own file under that file's stale guard. - **Clip edits.** Select and drag to move, split at the playhead (Ctrl+E), and drag either edge to trim, each written once on release in the spelling the author used (`src/commands/ui-edits.ts`, tested byte for byte). A looped or cross-rate clip refuses the gestures whose arithmetic would be wrong for it. - **The insert panel.** The selected clip's track chain, with add, edit, and remove for the built-in effects: a knob strip for `limit`, `reverb`, `plate`, and `hall`, and for `eq` a response curve with draggable bands. The curve's arithmetic is `src/audio/eq-response.ts`, a term-by-term port of `biquad.cpp`'s response math under the suite, which render-pipeline.md decision 4 now records as a bounded reversal. A hosted plugin stays read-only. Stack additions, recorded against project-core.md §5: `ws`; react + vite inside the workspace; `electron` as the shell. The diff also adds `docs/projects/daw-features/readme.md` at `status: draft`, a catalogue of what users love in other DAWs and what they wish theirs did, with §16 recording four picks. Each pick is its own project at `priority: later`: `detail-pane`, `actions-and-macros`, `sound-browser`, and `key-conforming`. ## Verified end to end, on real hardware ```text ui smoke (driven over the real WebSocket, real WASAPI device): snapshot: 2 lanes, correct kinds play -> PLAYING, position events streaming mute -> mute: true lands in main.yaml, watch carries it, snapshot reflects solo -> session swaps, soloed held; un-solo swaps back stale-hash edit -> rejected: "file changed underneath — refreshed" ``` That run was eve's, on Windows, before the timeline and the review fixes. CI's `linux` and `windows` jobs run the whole suite on every push. It was developed on top of the Windows stack (#157–#161), because the live loop it exercises needs the pipe transport on eve's machine. That stack has landed, so this branch is now based on `main`; content-wise it is orthogonal to the Windows work. ## Testing Run these from the root of a checkout of `ui/first` on macOS or Linux. `pnpm build:native` builds the daemon into `native/audiod/build`, which the daemon tests need, and `pnpm --dir ui build` writes the client to `ui/dist`, which `field ui` serves. Set `ELECTRON_SKIP_BINARY_DOWNLOAD=1` for the install if you do not need the desktop shell. ```sh ELECTRON_SKIP_BINARY_DOWNLOAD=1 pnpm install --frozen-lockfile pnpm build:native pnpm typecheck pnpm test pnpm --dir ui build project check ``` You should see a clean typecheck, `Test Files 77 passed (77)` and `Tests 984 passed | 1 skipped (985)`, a Vite build that ends `✓ built`, and `Project plans are valid.` The view's server-side logic is covered by `src/commands/ui-edits.test.ts`, which compares written YAML byte for byte, `src/commands/ui-timeline.test.ts`, which checks each lane's `entry`, a child row's origin past `slip` and `source_offset`, and an open window's length, `src/commands/ui.test.ts`, which checks that a request path cannot leave `ui/dist`, `src/graph/live.test.ts`, which checks a frozen track under a solo against the daemon, and `src/model/cables.test.ts`, which checks a muted sender. A failure in `ui-timeline.test.ts` would mean a socket op writes to the wrong entry or a cut lands away from where it was heard. The live checks (play, mute riding the watch, solo swapping, the shell's fallback, the keyboard on faders) need a real output device and a person at the window: run `field ui <song>` in a project with a built daemon. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- projector-summary v=1 sha=f61b4a1f42c00ed6693b9306bcc30b5787e388d0 --> 📽️ **Projector summary** of f61b4a1: https://field.amnes.ac/reviews/163 --------- Co-authored-by: Claude Fable 5 <[email protected]> Co-authored-by: Justin Balthrop <[email protected]>
Watching and mixing, nothing else: the first UI is a
field uicommand serving a local TypeScript client that shows the transport and the song's tracks, with fader moves landing asgain_dbwritten through the same comment-preserving machinery every tool uses. The constraints are the ones the rest of the repo already lives under, stated up front so the UI never gets an exemption: files stay the source of truth (the UI holds no state the files don't — two views of one project converge because the files are the meeting point), the daemon stays musically ignorant (bars project client-side from the tempo map, samples cross the socket), and plugin editors stay chunk 3's native owner-attached windows — launched viafield open, never embedded, which a browser could not do anyway.The architecture follows from one fact: the daemon speaks a unix socket a browser cannot reach, and every write path the UI needs —
loadProject, the YAML writers,AudiodClient, the watch loop — already lives in field's Node process. Sofield uiis a thin HTTP/WebSocket layer over what exists: static assets out, daemon events and file-change invalidations down, edit operations up, no second daemon and no protocol fork.Status is
Draft— §5's remaining questions do not block this PR, and the flip toActiveanswers them. Three settled on Justin's answers mid-review: Vite + React SPA (Next's server half duplicates a server field already is; the elements that eventually serve audiofield.io get pulled out into that product later, not carried as a framework now), local first confirmed, and the full TUI is wanted outright, later — it coexists with this UI, so the want moves from a clause inside add-insert.md §3's disposable-picker decision to its own line on later.md, in the same diff. Still open: browser tab versus desktop shell (browser first; a shell when plugin-editor window adjacency actually hurts), workspace layout for a DOM toolchain, whether fader drags send live ramps or only the release writes (chunk 3's gesture-quantum rule pulls toward release), and styling. Stack additions ride project-core.md §5 at the flip, like every stack decision.Testing
Docs-only — nothing builds or runs. What to check:
docs/projects/all/ui.mdrenders withstatus: Draftand the section numbering citations will rely on (§2 constraints, §3 scope, §4 architecture, §5 open questions); next.md links it and no longer reads "Nothing committed yet."; and the plan's citations were grepped against their sources before writing (plugin-hosting.md §5 chunk 3 / decision 7, automation.md's lane-UI line, add-insert.md §3's disposable-picker decision, project-core.md §5).Note
Low Risk
Documentation-only; no runtime, API, or build changes.
Overview
Adds a Draft project plan in
docs/projects/all/ui.mdfor the first graphical UI: a localfield uicommand that serves a TypeScript client for watching and mixing — transport/position, track list, andgain_db/pancontrols with edits written through the same YAML write-back as other tools.The plan locks in repo-wide constraints (files as source of truth, daemon stays sample-oriented, plugin UIs via
field openonly), scopes v1 vs non-goals, and describes architecture as HTTP + WebSocket in the existing Nodefieldprocess (no second daemon). §5 lists open questions (Vite+React vs Next, browser vs shell, package layout, live fader ramps vs write-on-release, TUI coexistence, styling) to resolve when the plan flips to Active.docs/projects/next.mdnow links this plan instead of “Nothing committed yet.”Reviewed by Cursor Bugbot for commit 4409da7. Configure here.