Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit ef2af84dc82a310e1d682ef2834f30002d70120f
parent 2fd6762573eea7516966391f6d087b85a8851d98
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Thu, 15 Oct 2026 09:42:59 -0400

plans: release 29 — lane C's review fixes recorded (bare domains, the two cookie writers, the quote strip, the social step's stale file, publish warnings and the re-draft notice, the small-frame deck); FACTS and CHANGELOG follow

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Diffstat:
Meditor/CHANGELOG.md | 4++--
Mplans/FACTS.md | 19+++++++++++--------
Mplans/release-29.md | 39+++++++++++++++++++++++++++++++++++++++
3 files changed, 52 insertions(+), 10 deletions(-)

diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md @@ -2,8 +2,8 @@ ## [Unreleased] - **Draft everything can add the on-screen deck first.** Tick **with the deck** beside **Draft everything** on a cut's Media tab (or `umtool chain <article> <n> --draft-all --deck`): before the flips, a step adds the on-screen deck with every setting at its default to a cut that has none, so the flips and threads are drafted on a cut the converter made. A copy of the cut as it was is kept in its revisions first. A cut that already has a deck is left as it is, and the step says "deck added" or "deck already there". Off by default: without the tick, Draft everything is as it was. Needs a restart of umtool. -- **Posts for X and Bluesky, drafted for you to copy — never posted.** A new media draft, `social`, writes a post for X and one for Bluesky, each with up to four more posts under it, from the article's evidence: third person, every name and number from the report, quotation marks only around words a cited clip says, and no links, hashtags, @mentions or emoji of its own. The link under the first post is added by code: the video's URL when the cut's manifest has one (`publish.videoUrl`, yours to set once the video is up), else the article's page on the homepage when the article is public there. The lengths are counted as each platform counts them — on X a link is 23 and an emoji 2, at most 280; on Bluesky 300 characters as a reader sees them — and a post over it is cut at a sentence or refused, never sent long. The Media tab's **Social posts** shows each post with its counted length and **Copy**; every build that writes `out/youtube.txt` also writes `out/x.txt` and `out/bluesky.txt`, and Draft everything drafts them after the YouTube text. Draft it alone from the Media tab's **Social** row, `archilyzer gen run social --iteration <n>`, or `generate` in the MCP. It takes narration's route in every preset. Needs a restart of the editor and umtool. -- **The site picker no longer loses your place in the history, or lags under load.** Choosing another site on a site's own page could, now and then, replace the page you chose it on in the browser's history, so Back skipped it; and on a busy machine a new site could take seconds to show on Dashboard or Channels. The choice is now written first and the page then moves or re-renders, every time. Needs a restart of the editor. +- **Posts for X and Bluesky, drafted for you to copy — never posted.** A new media draft, `social`, writes a post for X and one for Bluesky, each with up to four more posts under it, from the article's evidence: third person, every name and number from the report, quotation marks only around words a cited clip says, and no links, hashtags, @mentions or emoji of its own. The link under the first post is added by code: the video's URL when the cut's manifest has one (`publish.videoUrl`, yours to set once the video is up), else the article's page on the homepage when the article is public there. The lengths are counted as each platform counts them — on X a link (also a bare `example.com`) is 23 and an emoji 2, at most 280; on Bluesky 300 characters as a reader sees them — and a post over it is cut at a sentence or refused, never sent long. The Media tab's **Social posts** shows each post with its counted length and **Copy**, and when you set the video's URL after the posts were drafted it says so and offers **Re-draft the posts**; a post past its count is a build warning, never a refusal; every build that writes `out/youtube.txt` also writes `out/x.txt` and `out/bluesky.txt`, and Draft everything drafts them after the YouTube text. Draft it alone from the Media tab's **Social** row, `archilyzer gen run social --iteration <n>`, or `generate` in the MCP. It takes narration's route in every preset. Needs a restart of the editor and umtool. +- **The site picker no longer loses your place in the history.** Choosing another site on a site's own page (or on a page opened from a `?site=` link) could, now and then, replace the page you chose it on in the browser's history, so Back skipped it. The choice is now written first and the page then moves, and a page you had open a moment before under the old site shows the new one. Two quick picks keep the last. Needs a restart of the editor. - **The drive health timing on `/storage` says "Saved." at once** — it could wait about five seconds (the next automatic refresh), as Settings' save did before. Needs a restart of the editor. - **A storage move's Reconcile and resume no longer calls a folder whose date alone differs "changed".** It says "N directories differ only in mtime" apart from what was added, missing or changed, and a reconcile with nothing else to settle says the copy's content already matches. - **`generate`'s answer for a media draft names the video project first**, above the iteration's own files. diff --git a/plans/FACTS.md b/plans/FACTS.md @@ -3257,7 +3257,7 @@ follow), `onChange` does `router.push("/sites/<other>/<segment>")` and "All site `app/lib/activeSite.ts`; base name `ACTIVE_SITE_COOKIE`, a host with no port uses it bare): `path=/`, `SameSite=Lax`, one year, `httpOnly`. The port is in the name because a cookie is shared by every port on a host and localStorage was per origin. -- **One writer:** `setActiveSiteAction` (`app/lib/activeSiteActions.ts`, `"use server"`), which +- **One writer** (release 29: two — see "Release 29 lane C"): `setActiveSiteAction` (`app/lib/activeSiteActions.ts`, `"use server"`), which only shape-checks (`isStorableActiveSite`: a `SITE_ID_RE`-shaped id of ≤ 128 chars, or `__all__`). Setting the cookie makes Next re-render the current page and its layouts, which is how Dashboard and Channels re-scope; nothing calls `router.refresh()`. @@ -9551,13 +9551,16 @@ parsed to 0 cues, indexing the video textless) is CLOSED by `200a3105` (transcri `toField` appends it. `out/x.txt` / `out/bluesky.txt` are `report-to-video/social.mjs` `composeSocialText` (the first post, then `— k/n —` and each thread post), written by build-video at the top of `writeYoutubeText` (a platform with no post loses its file) and by Draft everything's `draft-social`. -- **The active-site cookie is written by `POST /api/active-site`** (`editor/app/api/active-site/route.ts`: JSON - `{value}`, an Origin that is not this host refused, `{ok}`), not a server action (`setActiveSiteAction` is gone). - `SiteScopeProvider.choose(value, {navigating?})` refreshes the router after a write unless the caller navigates; - `record` (a site page's visit, the migration) refreshes too. Why: a cookie set in a server action is answered before - the router applies the action's re-render; a `router.push` in that gap discards the action and its replayed refresh - can commit the push as a history REPLACE (Next 16 `HistoryUpdater`: a push whose URL is already the location is a - replace). +- **The active-site cookie has two writers, by what follows the write** (release 29 D1 and its review): where the page + STAYS (a pick on Dashboard or Channels, a site page's visit, the migration) `setActiveSiteAction` (its answer + re-renders the page; a route write followed by `router.refresh()` was, now and then under load, never applied); + before a NAVIGATION (the picker on a site's page or a `?site=` link's) `POST /api/active-site` + (`editor/app/api/active-site/route.ts`: JSON `{value}`, an Origin that is not `x-forwarded-host ?? host` refused, + `{ok}`), and the picker `router.refresh()`es once the new URL has committed (a route does not clear the client + cache). Why the route there: a server action's re-render is applied after its answer; a `router.push` in that gap + discards the action and its replayed refresh can commit the push as a history REPLACE (Next 16 `HistoryUpdater`). + `SiteScopeProvider` chains both writers through one promise (the last pick is the last write) and shows another + tab's broadcast value at once, then refreshes. - **A server action that revalidates delays its own answer** until the router applies the revalidated tree, which under in-flight prefetches can wait for the next AutoRefresh pulse (~5 s). Settings' save (R6.3) and the drive health timing's save (`saveHealthTimingsAction`, D1) no longer revalidate and refresh after an ok answer; the lane diff --git a/plans/release-29.md b/plans/release-29.md @@ -490,6 +490,45 @@ The social promotion text, text only. Built as the plan's Shape row, with these | `800a26fc` | editor e2e: `storage-locations.spec.ts`'s any-age eviction watched in the page | | (this commit) | these records, FACTS "Release 29 lane C", CHANGELOG | +### Lane C review fixes (2026-10-15, lane C, `r29/gen-debts`) + +The review of `cfdeb856..2f6a0ad1` (no blocker), fixed on the branch: +- **X weighs a bare domain** (`Kick.com`, `x.co`, `a.pages.dev/…`) as 23: `SOCIAL_URL_RE` takes a scheme-less + `label.tld` whose TLD is in `SOCIAL_TLDS` (a conservative list), not glued to a word, an `@` or a dot (so `e.g.`, + `3.5`, `a@b.com` are not links); `hasLink` is the social task's link refusal. `Kai streamed on Kick.com` is 39; 270 + characters and ` x.co x.co` are 318. +- **The site picker after a navigating choice** refreshes once the new URL has committed (an effect on the URL after + the push or replace), so a page cached under the old site re-renders. And then — found while re-running the spec — + **the cookie has two writers again**: where the page stays, `setActiveSiteAction` (its answer re-renders the page); + before a navigation, the route. With the route for every write, a pick on Channels in a second tab now and then never + re-scoped (a `router.refresh` after the write that was not applied: 1–3 of 70, and a retried refresh did not help); + the action never did. Both writers go through one promise chain (the last pick wins); the route's origin check reads + `x-forwarded-host` first; another tab's pick shows at once. site-scope.spec: every pick waits for hydration, a + re-scope's wait is 15 s (`RESCOPED`), and a new case — a choice on a site's page reaches Channels cached under the + old site. +- **A social post's quotation marks** are stripped only when they wrap it whole. +- **Draft everything's social step** removes a platform's old `out/<platform>.txt` when it has no post. +- **`publish.x`, `publish.bluesky`, `publish.videoUrl` are warnings** (`publishWarnings`, `drafted.mjs`): the lint warns, + the build and the cut's structural edits go on; YouTube's rules and an unknown `publish` key stay errors; "Use this" + on a social post still refuses one past its count (the field's own writer). When `publish.videoUrl` is set and a post + drafted before it does not carry it, the Social posts section says so and offers **Re-draft the posts** (a forced + `social` draft on the cut's iteration; a post you wrote is named and never replaced). +- **A deck refused on a small frame** says "frame too small for the deck (W×H): …" (`deckRefusedDetail`). + +| Commit | What | +| --- | --- | +| `ed4a429d` | common: bare domains in X's count and the task's refusal; the quote strip | +| `be921c5b` | common, umtool: `publishWarnings`; the re-draft notice and `RedraftSocial`; the social step's stale file; the deck's detail; tests | +| `f338e552` | editor: the refresh after a navigating choice, the write chain, `x-forwarded-host`, the broadcast value; site-scope.spec | +| `dcb704ba` | editor: the server action back for writes where the page stays | +| (this commit) | these records, FACTS, CHANGELOG | + +Gates: tsc clean at every commit. common 4236/4236 (+1: the quote case; the X cases are in existing tests); test:scripts +1022, 1019 + 3 skipped, 0 failed (+2: the small-frame deck, the lint warning); editor unit 308/308; mcp 371/371; umtool +unit 33/33 (final counts in the report). umtool e2e `media-draft.spec.ts` + `media-surfaces.spec.ts` 7/7 (1.7 min; the +social case now sets `publish.videoUrl` and re-drafts). Editor `site-scope.spec.ts`, 15 tests a run: with the route +alone 69/70, 69/70, 67/70, 69/70, 140/140, 68/70; with the action back 140/140 (`--repeat-each=10`), 70/70, 70/70. + ### Lane C gates (2026-10-15, `r29/gen-debts`) Counts at the branch's start (`3217bdfb`) → before the merge → after the merge of `r29/integration` (`d30248dc`):