Divan

Guidelines

Pitfalls and checks

What goes wrong on phones and in Persian, and how a screenshot of every page at phone and desktop widths in both languages catches it. Each one has the fix that keeps it away.

Tone and colour

Colours that vanish from components

tailwind-variants’ own tv merges classes with Tailwind’s defaults: it reads text-callout as a colour and drops the variant’s text-primary, so plain buttons lose their copper, destructive ones their red, and the copper button its dark label.

  • Every component with variants imports tv from #lib/utils.js, which knows the Divan type styles, shapes and widths; a test fails on import { tv } from 'tailwind-variants'.
  • After adding a component with the shadcn CLI, change its tv import before using it.

Copper on things nobody can press

A copper progress dot, a copper-tinted capsule, copper bars, ranges or bullets look pressable and water down the one copper action on the page.

  • Copper (primary) only on buttons, links and one highlighted word.
  • Happening now is the lapis progress dot (bg-progress); capsules are neutral; data marks, numbers and bullets use neutral tones.

A chosen segment nobody can see

A chosen segment one shade off its track, with the same label colour as the others, leaves people guessing what is on.

  • The chosen segment, toggle or tab is bg-selected with text-foreground; the others are text-faint. segment(), Toggle and Tabs already do this.

The browser’s own checkbox and select

A native checkbox (accent-primary) is a different size, shape and tone from every Divan control, has no big tap area and no dark-mode tone, and a native select opens the operating system’s list. Next to Divan fields they read as unfinished.

  • Pick several: <Checkbox> (with indeterminate for “some of them”). On/off: <Switch> in a Field with one line on what it does. One of a few: <RadioGroup>. One of many: <Select>; <NativeSelect> only where a form must stay native.
  • A Checkbox is a button, not an input: read its state from onCheckedChange, and from onclick (with the shift key) for range picks.
  • Check the actions that follow a pick: show them when something is picked, not as a row of dimmed buttons with captions.

A disabled quiet button that looks like the main one

A fill on a disabled ghost or plain button (a Previous that cannot go back) makes it look more important than the active button beside it.

  • Only filled variants (default, tinted, secondary) keep a fill when disabled; quiet ones just fade to text-faint.
  • A disabled control still gets its reason beside it.

A destructive button that looks like any other

Disconnect, Delete or Sign out drawn as gray, ghost, copper or red text alone reads like every other button, so people press it without thinking.

  • Give anything with a negative or sensitive meaning (disconnect, delete, remove, block, reject, end, sign out) variant="destructive": a soft red fill with red text, its own colour.
  • Never colour another variant red by hand (variant="secondary" class="text-destructive").
  • When it can’t easily be undone, put it behind a second step: ConfirmButton or ask().

The browser’s own confirm()

confirm(), alert() and prompt() open the browser’s dialog: its language and look, not ours, left to right on a Persian page, blocking the whole tab, and easy to tick away for good. It reads as an error, not a question.

  • For one button, ConfirmButton: the first press turns it into the question, with Cancel and the verb, in place.
  • For a decision made in code (a bulk action, a form’s enhance callback), await ask(question, { confirmLabel }) with <ConfirmDialog /> mounted once.
  • pnpm divan:lint flags confirm(), alert() and prompt().

A hint that lives only in the placeholder

“Leave blank to keep it”, “empty = made from the English title” and “same as Ravi” sat inside left-to-right fields: they vanished once you typed and read backwards in Persian.

  • Put the hint under the field (Field.Description); a placeholder only shows the shape of what to type.

Codes and outside messages shown as they came

People read “spam · borderline”, “Answered by instagram”, “@unknown”, “admin:email”, a post state run through a name formatter, and Supabase’s own “Invalid login credentials” in red.

  • Map every code to words in both languages (categories, states, who answered) and every outside error to guidance that says what to do.
  • A missing name is a plain word (“someone”), never a placeholder code.
  • A country is its name (Germany, آلمان) with the code as a hint, a device is a word (Tablet, تبلت), never “DE” or “tablet”.
  • A platform that turns a key away (OpenRouter, ElevenLabs, Tencent Cloud): say what to do by the kind of refusal (a key it does not know, no credit left, no answer) and log the platform’s own words for the team, never on the page.
  • A take a platform turned away (Higgsfield’s “403: not_enough_credits”) says why by that kind on every page that shows takes: the generator, the Canon page, a shot’s page, the grid and the viewer (takeFailure in src/lib/studio/failures.ts).

Two names for one thing, or words that contradict the dot

“Waiting for a person” and “Needs a person”, an “Errors” group and a “Not sent” card, “Follows you” and “Follows us”; Zernio rows always said “connected” while their red dot said otherwise; links called a page by an old name (“DM page”, “Integrations”).

  • One word per idea, the same as the menu and the StatusBadge words.
  • A row states its real state in words; the dot only repeats it.
  • A link to a page uses the page’s menu name.

A tab title that is not the page’s name

Every backoffice page wrote its own <title>, and they drifted from the menu: “Posts | Instagram” for Instagram posts, “Instagram Inbox” for Instagram inbox, “Instagram” for Instagram overview, the group’s name for Episode names’ Overview. The tab, the history and a bookmark named a page the menu does not have.

  • The backoffice layout names every page from its menu entry: “label · group | Backoffice”, in the page’s language. A page sets no <title> of its own.
  • pnpm divan:lint flags a <title> in a backoffice page (page-title-in-page); to rename a page, change its entry in src/lib/backoffice-nav.ts.
  • The studio names its pages the same way, “Page | Studio”. A page outside its menu list (All projects, Trash) is named in the layout too: the first version fell back to the app’s name on both sides, “Studio | Studio”.

A space Svelte drops at the start of a block

{#if r.campaign} · {r.campaign}{/if} printed “instagram· story-youtube-subscribe”: Svelte removes the whitespace at the start of a block, so the space before a separator disappeared. Six places had it (Live’s source, Comments’ totals, Donations’ contacts, a message’s line in the Inbox, the model picker). A space before an expression goes too: the Labels sheet read “One on each line.Design lock needs this.”

  • Put the separator in the expression ({x ? · ${x} : ''}) or write it as a string ({' · '}).
  • pnpm divan:lint flags a block that starts with a space and then text or an expression (space-at-block-edge).

See-through fills on the wrong surface

muted and accent are translucent. On a dark card they look empty, and stacked on each other they lose their difference.

  • Use muted for fields and rows on a card, accent only for hover and selected, popover for anything raised.
  • Never put muted inside muted.
  • A part drawn both on a card and on the page takes the tone of where it sits: Dabir’s proposal card is muted on Dabir’s card-tone panel and card in the room’s chat, which sits on the page, so its gray buttons and fields are never muted inside muted (ProposalCard’s tone).

A disabled control with no reason

A dimmed button with nothing beside it reads as broken.

  • Every disabled control has a short faint caption that says what makes it available.
  • A Save with nothing new to save (the company’s name as it is) stays pressable: saving the same thing again is harmless, and a dimmed Save beside a field reads as a field that cannot be changed.
Wrong
Right
Available after you sign in.

Colours outside the tokens

A hex value or Tailwind’s red-400 drifts from the system, and fails contrast on one of the surfaces.

  • Tailwind’s own palette is switched off; only token names compile. Brand marks (the Google logo) are the only hex values allowed.

Class names the merge helper doesn’t know

cn() drops classes it thinks conflict. A new text-* style it doesn’t know is taken for a colour and removed next to text-muted-foreground.

  • When you add a type style, radius or container to layout.css, add its name to the list in src/lib/utils.ts too.

ask() with no dialog mounted

await ask(…) waits for an answer from <ConfirmDialog />. When none is mounted nothing appears and the promise never ends: the button seems dead.

  • Mount <ConfirmDialog /> once in the layout of every area that calls ask(); a page never mounts its own (two dialogs would open).
  • Check it: press the button and the question appears.

A normal state shown as a warning

Every donation without a round carried an attention dot and “Not linked”, and the count sat among the things that need you. But people give outside rounds too: most of those gifts were fine, the list never emptied, and the one gift that really needed a person (made during a round, with the code forgotten) was lost in it.

  • Say what a thing is in plain, neutral words (“No round”, “Outside rounds”) and keep the attention dot for what a person must act on.
  • Narrow the warning to the cases that need someone (here: gifts made inside a round’s days that no round claims), and say why (“a donor may have forgotten the code”).
  • Before adding a count to “Needs you”, ask whether it can ever reach zero by doing the work.

Two words for one thing, and one list shown three times

Episode names called the same thing a round on one page and a campaign on the next, and showed the people on a round’s board on three pages (Backers, Entries “On the board”, the Campaigns donors table), each with different columns and actions. Nobody could tell which page was the one to use, or whether “Rounds” and “Campaigns” were different things.

  • Pick one word per idea and use it on every page, in the menu and in the buttons; say the words once where people start (a short “The words on these pages” list).
  • Give each list one home where it can be acted on, and let other pages link to a view of it (Entries?filter=board) instead of drawing their own copy.
  • When a page is merged into another, keep its old address working with a redirect to the view that replaced it.

Two switches for one thing, and a promise the page cannot keep

Whether Ravi answers at all was a switch at the bottom of Persona and model, while each platform’s Off / Drafts / Automatic sat on Reply settings: two places to turn the same thing on, and turning one on did nothing while the other was off. The same page said “a bad edit can be rolled back”, but nothing in the backoffice could roll one back.

  • Give a setting one home, where people look for it (Ravi answers: at the top of Reply settings), and from the other pages say that it is off and link there.
  • If a page promises something (earlier versions, an undo), show the way to do it on that page, or do not promise it.
  • Repeated actions in a list (Send, Save for each platform, Use this) are tinted or secondary: one filled copper button per view.

A selected card outlined with a ring

The studio’s first selection marked a chosen shot with ring-2 ring-primary: a copper line around the card, the one kind of line Divan keeps for keyboard focus. The no-lines check caught ring-1 but not ring-2.

  • Show what is selected by tone: the card turns bg-primary/16 and its select button fills copper with a check mark.
  • Keep ring-2 for keyboard focus only (focus-visible:, peer-focus-visible:); pnpm divan:lint flags any other ring width (ring-outline).

A count that reads “1 pictures”

The studio’s model picker said “Up to 1 pictures” under models that take a single reference, and the note under the tray said “takes up to 1 references”. The phrases were written for many and never read with one.

  • Every English phrase with a count has its singular: (n) => (n === 1 ? 'One picture' : Up to ${n} pictures).
  • Read each count phrase with 0, 1 and many before shipping. Persian has no plural after a number, so only English needs the second form.
  • tests/studio.test.ts calls every English count phrase in the studio with 1 and fails on “1 pictures”.

Guidance only a developer can follow

The studio told the filmmakers who make with it “Set OPENROUTER_API_KEY on the worker to generate”. None of them can: it needs Cloudflare’s dashboard and a deploy. The words said what to do, but to the wrong person, so the page looked broken to everyone who read them.

  • Say what to do in a place the reader can reach from where they are: “Connect OpenRouter under Connections, then generate.” Name a setting by the page and words they see, not by its variable.
  • When only a developer can fix it, say who to ask and keep the variable for them, second: “… or set OPENROUTER_API_KEY on the worker.”
  • Give people a way to do it themselves where you can: the studio’s Connections page takes a key of one’s own, and the backoffice’s Studio models takes the team’s.

One name for two things

Seedance 2.5 is on OpenRouter and on Higgsfield, made with different accounts and billed apart. The studio showed both as “Seedance 2.5” in the model picker and “seedance-2.5” under a shot, so nobody could tell which one made it or which account paid.

  • Say where a thing comes from beside its name wherever the name alone fits two of them: “seedance-2.5 · Higgsfield” under a shot and in the viewer (modelLabel in src/lib/studio/catalog.ts), a quiet “Higgsfield” after the name on the picker’s button.
  • Group a list by where things come from (On Higgsfield, Featured on OpenRouter) instead of mixing look-alikes in one list.
  • In a list of the Canon’s files, put a file’s folder in front of its title when another file has the same title (three episodes’ scores all called “Instrumental score for…” in the cut’s Score list): at the end, a long title cut short hides it.

Two fields for what the other site shows as one

Connecting Higgsfield asked for a Key ID and a Key secret. Higgsfield’s console gives a key as one line, “<key id>:<secret>”, so the whole line went into Key secret, the key went out as “Key <id>:<id>:<secret>”, and the page said “Higgsfield doesn’t know this key”: true, but no help to someone holding a key that works.

  • Take a credential the way the other site hands it over: a one-line key pasted whole into either field is split into its parts (Platform.oneLine and splitOneLine in src/lib/gateway/platforms.ts), in the browser and again on the server.
  • Say in the hint what the other site shows and where it goes, in its own words (“If the console shows the key as one line, key ID:secret, paste it whole”).
  • Read the other site’s codes by its own documentation: Higgsfield’s 403 means the balance is too low, not a wrong key. tests/gateway.test.ts holds both.

A checkbox no one can press

A line’s pipeline showed what the studio checks by itself (rights known, a release planned) as disabled checkboxes. Ticked, they kept the copper fill of a control, so they read as something to untick, and nothing happened.

  • Say a state no one can change with a Status (dot and word): Ready, Not yet. Keep Checkbox for what a person ticks.
  • A checkbox disabled for a while (while saving, without the right to edit) uses disabled={…}; one disabled for good is a status.
  • pnpm divan:lint flags <Checkbox disabled> (checkbox-always-disabled).

A problem about the whole form in red

The sign-in said “Signing in is off here right now” and “The code didn’t go out” in red text under the last field, as if that field were wrong; twelve other places in the studio’s forms did the same with problems no field could fix.

  • Say a problem about the whole form with a quiet <Note>, with the way forward in its words.
  • Keep red text for the guidance under the one field to fix (Field.Error).
  • pnpm divan:lint flags a red paragraph that is a status line (red-status-line).

A page that says what it is for twice

AI usage, Studio evals and Canon repos showed their menu entry’s sentence under the title (SectionHeader does that by itself), then their own longer lead right below it, starting with the same words.

  • Say what a page is for once. A page with a lead of its own gives it to the header, <SectionHeader body={t.lead} />, which takes the menu’s place; a page without one leaves the header to the menu’s words.
  • The menu entry stays short (what the page is for); the lead may say more (what is on it, what is not yet).

A number without what it counts

Dabir’s cards showed a Format’s running time as “Running time 600”: the field counts in seconds, and the card printed the number alone, so 600 read as minutes, or as nothing at all. The file’s own labels said “600 seconds”; the card that proposed them did not.

  • A value of a field that counts in a unit says its unit wherever it shows away from the field’s editor: 600 seconds, ۶۰۰ ثانیه, 50000 US dollars.
  • Write a label’s value with labelWords (src/lib/studio/types.ts): its words in the page’s language and digits, then its unit, which unitOf reads from Studio’s own types.
  • tests/studio-look.test.ts reads a running time, a budget and a rate with their units.

One line’s words on another line’s page

The seven lines share one page, and words written for one showed on another: the Books page said “This project’s shots show here” and “Describe a scene below”, and the Films tip said “Break the episode into scenes” for a story that is one film.

  • Give each line its own words where it differs: src/lib/studio/spaces.ts holds a line’s unit, tagline, tip, prompt and empty words.
  • A word shared by every line says nothing only one has: “the story”, not “the episode”.

A count of the machinery in place of where the work stands

Projects listed each story’s folders (37 for a story made a minute ago, every one made by Studio) and nothing about where the story stood: a person read a number they never made and learned nothing.

  • A list of work says where each piece stands (its line and stage) and what was made in it.
  • Leave off counts of what Studio makes for itself: folders, files, packs.

Paths and file names shown to a person

The room said “Looked in .studio/”, “Read story.md” and “It waits on Films/Format.md”, and in Persian «در شناسنامه/ گشت», where the slash after a folder reads as a stray mark. A person never sees how Studio stores files.

  • Name a file by its title, or by its name without .md; a folder by its name; Studio’s own folders by what they hold (“the story’s rules and skills”).
  • Keep the paths for the model, which works with them: src/lib/studio/pipeline.ts waitingItem is for people, and Dabir is told the paths.

Studio’s machinery in the assistant’s words

Dabir asked “Which root code should the film have?”, spoke of the “story-order ladder”, and offered times of day as golden_hour and blue_hour: the words of Studio’s own tools, which a person has no use for.

  • Tell the model to speak in the person’s words: “the story order”, not ladder, rung or root; choices as a person says them (Golden hour).
  • Let the model choose codes, file names and folders itself and never ask for one.

A name cut where a phrase is still open

New Project named a story from the first words of its sentence and stopped at a word count: “A five-minute animated short film for children aged”. The name ended where the reader waits for more.

  • Cut a name at a word that carries meaning: drop a trailing “for”, “aged”, “about”, «برای», «و» (src/lib/studio/new-project.ts firstName).
  • A name shown inside a sentence or a title (New version of “…”, The final of “…”) is cut at its last whole word, with an ellipsis (shortLabel in src/lib/studio/options.ts): slice(0, 40) left “The final of “The same tile and bird as the last strok”” with no sign that anything was cut.

An owner’s ’s added to a name by hand

Templates made a name an owner by writing ’s after it, so a line’s room would have said “Books’s checklist”, and the backoffice’s model picker “ElevenLabs’s list”. A name that ends in s takes the mark alone.

  • Make a name an owner with ownerOf(name) from #lib/i18n/en.js: Books’, Films’ and ElevenLabs’, but Audio’s and Music’s.
  • pnpm divan:lint finds ’s written after a name in a page’s words or its markup (en-owner-by-hand).

A sheet that says Add for what is there already

Read Again on a book of the Library opened the sheet that first adds a document: “Add to Library”, “Studio reads its text line by line”, and a button “Add and Read”. The book was in the Library already, so the person could not tell whether a second copy would be made or the book read again.

  • A sheet that opens both for something new and for something that is there names what it does each time: its title, its lead and its button (Read Again; Edit and Save), and says what happens to what is there (a new reading takes the place of the old lines). LibraryPanel keeps which one it is (again); CanonSheet and ReleaseSheet do the same for an item and a release.

Episodes named by their codes

Films’ map card listed the series as MAP_S01E01, MAP_S01E02 and MAP_S01E03, each followed by “The season arc 0/1 The treatment 0/1 The script 0/1”, under “Now: Greenlight” with nothing to say what Greenlight is. A founder new to the words could not tell what any of it meant.

  • Name a row as people do: Episode 1 and its title (Season 2, Episode 3 when there is more than one season), a film’s Sequence 1; the code stays in the link (mapRowName in src/lib/studio/map-rows.ts).
  • Show what each row still needs as words with a done mark (Its line, Treatment, Script), a count only once it has parts, and say once above the rows what each step is.
  • Under the step the story is at, say in one plain sentence what it is (STEP_HELP in src/lib/studio/pipeline.ts: Greenlight is the yes to make it).
  • What a step waits on names codes the same way (waitingItem in src/lib/studio/pipeline.ts, codeName in src/lib/studio/map-rows.ts): “It waits on Season 1, Episode 1”, never MAP_S01E01; Dabir alone still reads the codes.

An answer that ends on what can wait

After the Format was set, Dabir ended with “Still open (you don’t need these yet): frame…, how characters are heard…, where it will be shown” and a paragraph about adding an edition of Rumi to the Library “before we go deep”. The founder could not tell what to do now and what not.

  • Tell the model to end with what happened, the one next step and one question, and to ask now for what this step needs rather than listing what can wait (ROOM_WAYS in src/lib/server/studio/dabir.ts).
  • When something is missing, say in one plain sentence what it is for and how to add it (the Library folder, Add to Library), then go on.
  • Write for a reader with dyslexia or new to film: short sentences, plain words, a film word explained the first time, short lists, no italics (PLAIN_WORDS).

A Send button dressed like the answers beside it

On Dabir’s question cards the answers to pick and the button that sends them were the same gray capsules, side by side: a founder could not tell which one sent the answer.

  • Draw the answers to pick as gray capsules (tinted once picked) and the button that sends them as the card’s filled button, with its arrow.
  • Keep one filled button in view: while a question waits, the room’s own Send turns gray, since the card’s Send is the one to press.

A tool’s own name in the chat

When Dabir searched the web, its line in the chat said “Used search web”: the tool had no sentence of its own, so the room showed its code name with the underscore taken out.

  • Give every tool Dabir may call its own sentence in both languages, what it did and what it is doing (TOOL_EN and TOOL_FA in src/lib/studio/room-words.ts).
  • tests/room-tool-words.test.ts lists Dabir’s tools (Studio MCP’s and the agent’s own in agent.py) and fails for any without both.

Persian and right to left

Code names that break and swap in Persian

In a Persian sentence page-container breaks at its hyphen and its parts swap sides; (max-w-prose) comes out as “(prose” over “max-w-)”. Code the string had isolated itself came back in pieces too: grid-cols-[minmax(0,1fr)] read “[](1fr,۰)minmax” and segment() read “()segment”.

  • Brand book strings go through <Rich>: code in backticks, Latin names isolated left to right and kept on one line, measurements in Persian.
  • That includes the short notes beside code (a list of files, a caption under an example), not only rules and block notes: “shadcn-svelte” outside <Rich> broke at its hyphen on a phone.
  • Inline <code> is its own left-to-right island everywhere (unicode-bidi: isolate in the base styles).
  • A span the string isolates itself (U+2066…U+2069, there for plain-text readers: Markdown, MCP) stays whole in Rich: one left-to-right island, in order, its digits as written. Rich used to drop the isolates and find the words again, which split code at every bracket and comma. Only a measurement alone (96px) still reads as Persian, ۹۶ پیکسل; text-body (16px) stays as written.
  • In a Persian sentence, code with a bracket (segment(), grid-cols-[…], {#if}) is isolated or in backticks, never bare: Rich and the browser hand the bracket to the other side, and the Persian title of “The browser’s own confirm()” read “()confirm”. A test runs Rich over every Persian string of the book and fails on both (tests/divan-mcp.test.ts).
  • A closing quote or bracket the name opened stays inside its island: surface="page" keeps its last quote, or Persian shows it on the far side of the name.

Example content left in English

A name, a label or a placeholder that stays English on the Persian page (Maryam, Connected, Delete Campaign…, Choose file) breaks the example’s promise that the component works in Persian.

  • Every example string goes through ex.t(), names, placeholders and captions included; numbers in the example’s digits.
  • Only code, file names and brand names stay Latin.

A chart that turns right to left in Persian

The Divan chart theme reversed the time axis on right-to-left pages, put the scale and the legend on the right, and turned a fixed range around; the flow ribbons were drawn in a mirror and a signed number like “−۶۳٪” lost its sign to the far end. Read in Persian, a chart and its numbers looked backwards.

  • A chart reads left to right in both languages: time runs to the right, the scale stands on the left, the plot is drawn dir="ltr" (Chart.svelte does this). Only its words are in the page’s language: Persian labels, Persian digits, the Persian calendar.
  • Every chart takes lang (or reads it from the page) and builds its layout with the Divan chart theme (src/lib/charts/theme.ts); day labels like 11-01 are categories (type: 'category'), or Plotly reads them as dates; value labels may draw past the plot (cliponaxis: false).
  • A number with a sign or a unit keeps its own order inside Persian text: fmtFor’s signed and delta come isolated left to right; a sign written by hand goes through ltrIsolate (src/lib/format.ts).
  • pnpm divan:lint flags an axis side or autorange chosen by the language (chart-mirrored).

A sheet that opens from the wrong side in Persian

Every backoffice task opened with side="right": right for English, where the end side is the right, but in Persian the menu sits on the right and the sheet came in over it from the same side, the start, instead of the end. A width set only for data-[side=right] was lost too, once the sheet came from the left.

  • Open a task with side="end" and a menu with side="start": Sheet.Content turns them into the right or the left from the page’s language.
  • Give a sheet’s width for both sides (data-[side=left]:w-… and data-[side=right]:w-…).
  • pnpm divan:lint flags a fixed side="left" or side="right" (sheet-physical-side); a page that decides it in code (side={isFa ? …}) is left alone.
  • Open every sheet with the page in Persian as well as in English.

A whole block or a date forced left to right

dir="ltr" sat on a whole <time>, a count line, a contact row and a table, so a Persian date («۲۶ آبان، ۰۹:۴۷») came out in pieces and the rows aligned to the wrong edge.

  • A block follows the page’s direction. Put dir="ltr" only on the Latin value inside it: <bdi dir="ltr">@name</bdi>, a URL, an id, a path.
  • Dates and numbers go through fmtFor(lang), never a fixed en-GB locale.
  • pnpm divan:lint flags <time dir="ltr"> (time-ltr).

A Latin value that flips inside Persian text

Without an isolate, a path read “episode/” for “/episode”, a handle put its “@” at the wrong end («سارا@» for a Persian name), and “net +12” or “+۵ pts” read backwards once a word sat inside the left-to-right part.

  • Wrap each Latin value (handle, path, URL, e-mail, id, env name) in <bdi dir="ltr">; in a string inside a .svelte file build the isolate with String.fromCharCode(0x2066…0x2069).
  • Keep words outside the isolate: the number alone in <bdi dir="ltr">, the word beside it in the page’s language.
  • A display name gets no “@”: only a handle does.
  • A name a person typed (a type, a title, a folder) can be in either script: inside Persian words wrap it in a first-strong isolate, \u2068name\u2069, so a Latin one keeps its place (the studio’s New Type wrote «Prophecy» into a Persian sentence and its words came out of order).

Isolate characters typed into a Svelte file

svelte-check warns about bidirectional control characters (U+2066–U+2069) in a .svelte file even when they are written as \u escapes, and an editor can turn a typed escape into the invisible character itself, which nobody can see in review.

  • In markup use <bdi dir="ltr">…</bdi>.
  • In a string inside a .svelte file build them at run time: String.fromCharCode(0x2066) … String.fromCharCode(0x2069).
  • In a .ts file write the \u escape, and read the file back to see it stayed an escape.

A text arrow that points the wrong way in Persian

“Open ↗”, “← All users”, “↳” and the “→” between steps (“Supabase → SQL Editor”) are text: they point the same way in Persian, where forward is to the left.

  • Use a lucide arrow icon with rtl:-scale-x-100, or wrap the glyph in <span class="inline-block rtl:-scale-x-100" aria-hidden="true"> with a word for screen readers.
  • pnpm divan:lint flags an arrow glyph on a line without rtl:-scale-x-100 (text-arrow); an English-only path shown left to right can say why with divan-ignore.

Persian digits typed into a number field

A type="number" field drops «۱۲», and Number("۱۲") is NaN: an entry number was refused and an amount of «۵۰۰۰» saved as 0, with nothing saying why.

  • Turn Persian and Arabic digits into Latin before Number() (latinDigits in src/lib/format.ts), on the page and on the server.
  • A count field is a text field with inputmode="numeric", read through that conversion.

A search field whose icon and text disagree

A search input with dir="ltr" or dir="auto" next to an icon placed at start-3: the input’s padding (ps-9) follows its own direction, so in Persian the icon sat on the right, the padding on the left, and typed text ran under the icon.

  • The input keeps the page’s direction (no dir), so icon, padding and placeholder agree.
  • Add [unicode-bidi:plaintext] so a typed Latin handle keeps its own order.

Latin words jump inside Persian text

An @handle, e-mail, URL or a number with a sign inside a Persian sentence is reordered by the browser: “@yourchannel” shows as “yourchannel@”, a full stop lands on the wrong side.

  • Wrap the Latin part in <bdi dir="ltr">…</bdi>, or in Unicode isolates (\u2066…\u2069) inside translation strings.
  • Give fields for handles, e-mails, phone numbers and codes dir="ltr".
  • pnpm divan:lint flags an e-mail address or a domain in a Persian string outside isolates (latin-in-persian), in .svelte files and in the words files (words.ts, src/lib/i18n): the company form’s “مثل name@company.com.” put its full stop on the wrong side.
  • A sentence that starts with a name (“{name} gave 50,000 toman”) keeps the page’s direction: split the template around {name} and wrap the name in <bdi>, never dir="auto" on the sentence, which turns the whole line around when the name is in the other script.
  • A text box cannot hold <bdi>, so the isolates go in the text itself: the studio’s composer wraps each @mention and #move of a Persian prompt in \u2066…\u2069 as it goes in (and any typed by hand when the box loses focus), and takes them out before the prompt goes to a model.
Wrong

این‌طور بنویس: @yourchannel

Right

این‌طور بنویس: @yourchannel

Digits in the wrong script

Ranks in Latin digits next to amounts in Persian digits read as two different systems.

  • Measurements in Persian prose read ۱۶ پیکسل and ۱۴٫۴:۱, and thousands use ٬ (toLocaleString('fa-IR')), never a Latin comma.
  • Format every number with the page language: n.toLocaleString(lang === "fa" ? "fa-IR" : "en-GB"), or the helpers in src/lib/format.ts.
  • Never type digits into Persian copy by hand.
  • A value turned into words goes through the same: valueWords (src/lib/studio/types.ts) gives a number in the page’s digits, so a Format’s running time on Dabir’s card no longer reads 600 among Persian words.
  • A text Studio writes into a Persian story’s Canon uses Persian digits too: a book’s record in the Library read «65 سطر، 4 صفحه» and its contents «سطر 1–65» (libraryRecord in src/lib/studio/library.ts).
Wrong

رتبه‌ی 3 · ۹۰۰٬۰۰۰ تومان

Right

رتبه‌ی ۳ · ۹۰۰٬۰۰۰ تومان

Physical sides break the mirror

pl-, mr-, left-, text-left and rounded-l stay on the same side in Persian, so paddings, icons and drawers end up on the wrong edge.

  • Use logical sides: ps-/pe-, ms-/me-, start-/end-, text-start/text-end, rounded-s/rounded-e.
  • Arrows and chevrons that mean “forward” get rtl:-scale-x-100.
  • Drawers open from the start side: left in English, right in Persian.

Floating parts lose the direction

Menus, popovers, sheets and dialogs render in a portal at the end of <body>, outside the element that set dir="rtl", so they come out left to right.

  • Pass dir (and the Persian font with font-sans) to Popover.Content, Select.Content, Sheet.Content and Dialog content on Persian pages.
  • A DropdownMenu takes the page’s direction by itself (src/lib/components/ui/dropdown-menu/dropdown-menu.svelte): bits-ui gives a menu its Root’s direction over any dir on its Content, so a dir passed to DropdownMenu.Content does nothing. Pass dir to DropdownMenu.Root only for a menu whose part of the page has another direction.

Letter-spacing and capitals in Persian

Tracking breaks the joins between Arabic-script letters, and Persian has no capitals; uppercase overlines look broken in Persian.

  • Kickers are text-subheadline font-semibold text-primary, no uppercase, no tracking.
  • The base CSS resets any tracking-* under dir="rtl" as a safety net; don’t rely on it.

Charts print Latin digits

Plotly has no Persian digits: tick labels, hover numbers and percentages come out as 1, 2, 3 on a Persian page.

  • On Persian pages pass labels and texts already formatted (toLocaleString('fa-IR')) and show them with text, customdata or texttemplate.
  • Bars and BarList take lang="fa" and do this for you.

Bidi characters in Svelte source

Svelte warns about the isolate characters U+2066/U+2069 in a .svelte file, even when they are written as escapes, so pnpm check stops being clean.

  • In markup, wrap Latin parts in <bdi dir="ltr">; give a <code> that ends in punctuation dir="ltr".
  • Keep the isolates (U+2066 … U+2069) for translation strings in .ts files.

English sent because there were no Persian letters

A message that picks Persian only when it finds Persian letters in what the person wrote sends English to everyone who wrote with emoji alone or in Finglish (Persian in Latin letters): 32 of 47 YouTube invites went out in English, to a Persian audience.

  • Choose the language with one tested function (src/lib/lang.ts): Persian letters mean Persian; Latin letters mean English unless the words are Finglish; no letters at all says nothing, so ask the next hint (what Ravi answered), then default to Persian.
  • Default to the audience’s language, not to English, when nothing says otherwise; the site does the same.
  • Use it everywhere a message picks its language (invites, the donation ask), so no place has its own copy of the check.

A Persian prompt that turns left to right because it starts with a mention

The studio’s prompt box and the prompts under each shot used dir="auto", which takes the direction from the first letter. “@image1 کنار @rostam” starts with the Latin letters of a mention, so the whole Persian line read left to right. Every other box people type in and the places that show what they wrote (the room’s chat, a question card, comments, replies and messages in the backoffice, the card in Claude) still used dir="auto", so “@rostam کجاست؟” read left to right there, its @ at the far side.

  • Take the direction from the words, not the handles: promptDir() skips @mentions and #tags and looks at the first letter after them.
  • Anywhere people type text that can start with a Latin token (a handle, a tag, a brand), set dir from its words the same way, not dir="auto".
  • Input and Textarea do it for every field with dir="auto": past a Latin @handle or #tag at the start they take the direction of the words (fieldDir, src/lib/direction.ts), and otherwise keep dir="auto", so a box of several lines still reads each line in its own direction.
  • Show what people wrote with <Written text={…} /> (src/lib/components/Written.svelte) inside its dir="auto" block: each Latin @handle and #tag sits in a <bdi>, which dir="auto" and unicode-bidi: plaintext pass over, so the line reads in its words’ direction and the @ stays in front of its word. pnpm divan:lint flags a dir="auto" block with unicode-bidi: plaintext that shows a bare {…} (written-words).
  • While it is typed, the @ of a handle still shows at the far side of a Persian box: a text box cannot hold a <bdi>, so only what Studio puts in the text itself (the Composer’s mentions) carries isolates.

Two settings with one Persian name

The studio called Resolution «کیفیت» in Persian; when image models brought their own Quality setting, it was «کیفیت» too, and the two sat side by side under one name.

  • Give each setting its own word in both languages: resolution is «وضوح», quality is «کیفیت».
  • When a new setting arrives, read the Persian labels of everything beside it, not only the new one.
  • tests/studio.test.ts checks that the composer’s setting labels differ in each language.

A row’s label in another script, at the far edge

The studio’s checklists gave each item’s label dir="auto". In Persian, an item someone typed in English turned left to right and lined up at the left, away from its checkbox on the right; on the Pipeline board, “test · نماها و صداها” ran left to right because it began with a Latin story name. Video titles in the backoffice’s YouTube and Instagram lists did the same.

  • A label in a row keeps the page’s direction and isolates its words: <span class="min-w-0 flex-1 truncate"><bdi>{label}</bdi></span>. A <bdi> finds its own direction.
  • A line made of a name and the page’s own words puts only the name in <bdi>.
  • Keep dir="auto" for a paragraph of its own (a message, a note).
  • pnpm divan:lint flags dir="auto" on a label that fills its row (row-label-dir-auto).

A Persian word joined to an adjective without its ezafe

The menu on a story’s Contents read «نما تازه پس از این», and the studio’s button for a new scene «صحنه تازه»: a template put the word before «تازه» as it was, and a word that ends in a vowel needs its ezafe written («نمای تازه», «صحنهٔ تازه», «تابلوی تازه»).

  • Wrap a word that a Persian template joins to an adjective or another noun in ezafe() from #lib/i18n/fa.js.
  • pnpm divan:lint flags ${word} تازه written without it (fa-ezafe), in pages and in their words files.

A page in English because the phone is in English

divanworks.com/yt, the page behind every YouTube link we hand out, chose Persian only when the phone or Instagram was set to Persian. Many people in Iran keep their phone in English, so our Persian audience got the English page, and it had no language switch to change it.

  • A page our own links lead to opens in Persian unless the visitor chose English (the language switch, saved in the site’s cookie) or the link asks for it (?lang=en: an invite Ravi wrote in English, a link on the site’s English pages; channelLink and inLang in #lib/youtube-invite.ts). Neither the phone’s language nor the country is a clear signal: many Persian speakers, in Iran and abroad, keep their phone in English.
  • Every page people land on has the language switch, a one-button page too: SiteHeader variant="task" brings it, and the choice is saved in the site’s cookie (LANG_COOKIE), so the server draws the next visit in it.

An ezafe right after a closing quote mark

The room’s Persian intro wrote «بی «بله»ٔ تو»: an ezafe needs a letter under it, so after the closing quote it showed as a dotted circle or a gap. The same was in Dabir’s Persian rules four times.

  • Say it another way, so no ezafe follows the quote: «بی‌آنکه «بله» بگویی», «منتظر می‌ماند تا نویسنده «بله» بگوید».
  • Divan’s lint flags «»ٔ» (fa-ezafe-after-quote).

A value cell that takes its text’s direction

An item card in the room listed its fields as label and value, with dir="auto" on the value’s cell. In an English page a Persian value moved to the far right of its cell, away from its label. In the Viewer, where values sit at the end, a Persian credit jumped to the other side.

  • Keep a cell in the page’s direction and put its value in a <bdi>: the value reads in its own direction and stays where every other value is.
  • Divan’s lint flags dir="auto" on a <dd>, <td> or <th> (cell-takes-text-direction), in Svelte and in the HTML a .ts module builds. In a text’s table (renderMarkdown), the cells keep the table’s own direction.
  • A line that opens with the page’s own words takes the page’s direction too (“Risks: …”, “Why now: …”, “(شاهنامه, line 13)”): no dir="auto" on it, and the value from elsewhere in a <bdi>. dir="auto" turned the room’s Ideas source lines right to left on an English page, because their first letter was a Persian title’s. The lint rule page-words-take-text-direction catches it.

Persian names listed in an English sentence

The room’s Ideas panel said who backed each idea, “By گفت‌وگونویس, فیلمنامه‌نویس, روان‌شناس”, on a page in English for a Persian story. Unisolated, the names and the commas between them ran together right to left, so the English reader met the last name first and the commas fell on the wrong sides.

  • Isolate each name in a list that goes into a sentence (nameList in src/lib/studio/room-words.ts wraps each in U+2068 … U+2069; in markup, a <bdi> each). The room’s convene card, its experts at work and its Ideas use it.
  • A book’s title beside its line is a name too: isolate the title alone inside the words (U+2068 … U+2069), and keep the phrase in the page’s direction, in a <span>, never a <bdi>. A <bdi> takes its direction from its first letter, a letter inside an isolate included: around “شاهنامه, line 14” it went right to left and put “line 14” before the title, on a card’s departure from the source and in the Ideas panel’s sources, isolated title or not. The room’s “Read “شاهنامه (متن)” from line 12” turned its brackets around too until the title was isolated.

Lines of a text that share one direction

Dabir’s question to the room, on its convene card, lost its line breaks, and once they showed, every line took the direction of the text’s first letter (dir="auto"). The Persian lines it quoted from the Library, each with its place («زال زر چو از کوه آمد فرود» (شاهنامه، سطر 13)), ran right to left inside a left-to-right paragraph: the list came out in the wrong order, its brackets at the wrong end. A person’s own message in the room, a file’s description, and comments, direct messages and Telegram messages in the backoffice mixed their lines the same way.

  • Show a text’s own line breaks (whitespace-pre-line or whitespace-pre-wrap) and give each line its own direction: [unicode-bidi:plaintext] beside dir="auto". The lint rule lines-share-one-direction catches a block without it.

A book’s lines in the page’s direction

The Library’s book reader gave its numbered lines the page’s direction. In an English Studio a Persian book (the Shahnameh) put each number at the left edge and each line (dir="auto") at the right, the width of the page between them, so no number could be read with its line.

  • Give a list of a text’s lines (a book, a script, a quote with its line numbers) the text’s own direction and language on the list itself (dir and lang from the book’s language, or from its letters: bookLang in src/lib/studio/library.ts), so its numbers sit beside its lines, in its digits.
  • It is “A value cell that takes its text’s direction” again, in a list: in a row laid out in the page’s direction, never give one cell dir="auto".

A file name whose extension jumps to the other side

An uploaded EPUB’s page was headed “epub.(EPUB) شاهنامه”: in a right-to-left name the dot of .epub took the Persian side and the extension came apart. The tree of the story’s files drew the same names.

  • Show a file’s name with fileNameShown (src/lib/format.ts): its Latin extension goes in a left-to-right isolate and stays whole at the name’s end, in either direction (the file’s heading, the tree).
  • Only where a name is shown: a value a field edits or saves keeps no isolate marks.

A loanword with its English plural

Films’ Release checklist asked for «تریلر، ریلز و پست‌ها», and the words for Films when picking a story’s lines said «قسمت‌ها، تریلرها و ریلزها»: Reels kept its English plural, once with «ها» after it too, where the glossary’s word is «ریل».

  • Take each word from the glossary (divan_glossary) and make its plural the Persian way: «ریل‌ها», «پست‌ها», «استوری‌ها»; never with an English s («ریلز»), never with both («ریلزها»).
  • Read the Persian of every list of things beside the glossary, word by word: a checklist’s items, a line’s words, a template’s headings. A person has to look: these words live in Studio’s modules (pipeline.ts, lines.ts, dossier.ts), not only in the words files pnpm divan:lint reads.

A play button turned around in Persian

The episode cut’s list of shots turned each shot’s play button in Persian, like an arrow that means forward, while Play All above it did not: two play buttons on one page pointing opposite ways, and one pointing back.

  • Leave a media control (play, skip, fast forward, rewind) as it is in Persian: it points the way the media plays, not the way the text reads (Apple’s guidance on right to left). Only arrows that mean forward or back in the text get rtl:-scale-x-100.
  • pnpm divan:lint flags a play, skip or wind icon with rtl:-scale-x-100 (mirrored-media-control).

A name in the other script cut at its beginning

A row keeps the page’s direction with the name in a <bdi>, so a name in the other script sits where the row starts. Cut short, though, it ran off at the row’s far side, where its own first words are: on a Persian shot page the takes’ English titles read “…d lifts off the white” and the strip’s “… workshop at dawn”, and the Canon’s tree did the same; a Persian name on an English page lost its first words the same way, and so did a name beside a label in one row (the backoffice’s filters, a shot’s code and title under the episode’s player).

  • Let a name in a <bdi> of its own cut its own words: layout.css gives a <bdi> that is a cut-short element’s only child display inline-block, max-width 100% and its own ellipsis, so the row keeps the page’s side and the name keeps its beginning, in either direction.
  • Where words share the row with the name (a label, a separator, a count, another name), give each its own element: the row flex with min-w-0, the words shrink-0, each name in <bdi class="min-w-0 truncate">. Left in one cut-short element, a lone <bdi> is one block on the line, and a long name is hidden whole behind the ellipsis (“on …” under a comment); pnpm divan:lint flags it (bdi-beside-words-cut-short).
  • Give the element wholeWhenCut as before: it looks inside such a <bdi> for the cut, so the whole name still shows on hover (src/lib/cut-short.ts).
  • Look at a long name in the other script where it is cut short (an English title on a Persian page, a Persian one on an English page): it shows its beginning and ends with an ellipsis.

One button with a different Persian word on each page

Undo said برگردان on Generations and in the backoffice, بازگردانی on the Canon page and واگرد in the editor, and the brand book’s own toast said برگرداندن, which Studio uses for putting something back from the Trash. The generator’s new help with the prompt took a fourth on its first try. A Persian reader cannot tell that these do the same, or that Undo and Restore differ.

  • Take a button’s Persian word from the glossary (divan_glossary: Undo / Redo is واگرد / ازنو), and add a word there before you use a new one.
  • Search for the button’s other words and change every place at once: words files, pages that keep their own words, and the brand book’s examples.
  • The lint rule persian-undo flags an Undo in any other word.

The name spelled out in Persian letters

Learning’s company page told a manager that a removed tutor keeps their page “if دیوان‌ورکس verified them”: the English name written in Persian letters. In Persian the name is هنرگاه دیوان, and a reader who meets two names wonders whether they are one company.

  • Write هنرگاه دیوان wherever Persian copy names DivanWorks (divan_glossary has it); the English name appears only as an address, in an isolate (divanworks.com).
  • The lint rule persian-brand-name flags the English name in Persian letters, with or without a space between its halves.

A Persian date that starts with its year

Studio’s story history headed each day with dateStyle: 'full', and Learning’s days apart formatted the weekday, day, month and year at once. In Persian both read «۱۴۰۵ آذر ۱۲, پنجشنبه»: the year first and a Latin comma, where a reader expects «پنجشنبه ۱۲ آذر ۱۴۰۵». The weekday alone, and the day, month and year alone, come out right.

  • Write a day in full with fullDay(at, lang) from #lib/time.js, or format the weekday on its own and put it before the day, month and year. On a chosen calendar, dayLabel in src/lib/learning/calendar.ts writes a day out, and the Calendar names its days with it: bits-ui’s own names for screen readers read year first too.
  • The lint rule persian-full-date flags dateStyle: 'full' and one format with both a weekday and a year.

An empty field that starts at the far side

Studio’s question card in Claude put the placeholder of its own-words box («پاسخ خودت…») on the left of a Persian card, where a Persian line ends, with its “…” at the wrong end. dir="auto" takes a field’s direction from its first letter, and an empty field has none, so the browser makes it left to right: on a Persian page, the placeholder and the caret of every empty field with dir="auto" sat on the left until something was typed, in the room, Studio’s sheets and the backoffice (85 fields), and in an empty Canon file.

  • Add nothing to a field with dir="auto": layout.css keeps it in the page’s direction while its placeholder shows and reads the placeholder in its own direction, so a Latin one (https://…) stays whole, and aligns it to the side the page starts on, so its caret starts there too; Input and Textarea leave dir off an empty field with no placeholder. Once something is typed, it takes the direction of its first letter, as before.
  • Leave a filled field to dir="auto". Kept in the page’s direction with unicode-bidi: plaintext instead, it looks the same in Chrome, but in Safari a long line in the other script cannot be scrolled to its end.
  • A page with its own style, outside layout.css (Studio’s card in Claude), carries the same two rules, and a field it builds leaves dir off while it is empty and has no placeholder (ownDir in src/lib/server/studio/connector-card-app.ts). A text editor’s line with no letters starts where the words around it start, and the words it shows in an empty text where the page starts (data-dir, src/lib/studio/line-direction.ts).
  • pnpm divan:lint flags the browser’s own <input> or <textarea> with dir="auto" and no placeholder (empty-field-far-side): use Input or Textarea, or dir={value ? "auto" : undefined}.

A month grid whose arrow keys run backwards in Persian

bits-ui’s Calendar moves to the day before on the left arrow in either direction, so on a Persian grid, whose week runs from the right, every arrow press went the wrong way (found while building Learning’s booking page). On its own it also starts every week on Sunday, names its buttons Previous and Next in English, and opens a Gregorian month in a Persian grid with no day chosen yet; and Intl titles a Persian month «۱۴۰۵ آذر», the year first.

  • Choose a day with Calendar (#lib/components/ui/calendar): the arrows trade places in Persian, a Persian week starts on Saturday (شنبه) and a Gregorian one on Monday, its words and digits follow lang, and the page gets the same ISO day (YYYY-MM-DD) from either calendar.
  • Days with nothing free go to isDateUnavailable: dimmed, and a press on them does nothing, rather than a no after the press. Days of the month before and after stay empty, so none reads as a dimmed one.
  • pnpm divan:lint flags bits-ui’s Calendar or RangeCalendar imported anywhere else (calendar-by-hand).

A blank line whose caret starts at the far side

An empty field on a Persian page showed its placeholder at the right but its caret at the left when it had room for several lines (the room’s chat, a question card’s own words), and so did a blank line, a new list item and an emptied table cell in the Canon editor. unicode-bidi: plaintext, which the browser gives a <textarea> with dir="auto" and the editor gives every line so that mixed text reads well, takes a line’s direction from its first letter, and lays out a line with no letters left to right whatever direction says, in Chrome, Safari and Firefox. The check after the fix for empty fields read the placeholder and the computed direction, and both were right; only the caret showed it.

  • Look at the caret as well as the placeholder: press into the empty field, or press Enter after a Persian line, and see where it blinks.
  • An empty field: layout.css aligns it to the side the page starts on while its placeholder shows (text-align from --start-side, which the nearest dir="rtl" or dir="ltr" sets) and keeps plaintext, so a Latin placeholder still reads whole. unicode-bidi: isolate would move the caret too, but Firefox reads the placeholder with the field’s own unicode-bidi and shows https://… as …/https://; and :dir(rtl) would not do, because the build turns it into a list of languages (:lang(ar), :lang(fa)…).
  • A line with no letters in a text editor: unicode-bidi: isolate and the direction of the words before it (after it, at the top; the page’s, in a text with no words), as data-dir from src/lib/studio/line-direction.ts. A new line after an English one starts at the left, after a Persian one at the right.

Phones

A control on top of what it acts on

A copy button floating over a code block’s corner hides the first line on a phone, where lines run long.

  • Controls sit in their own row (CodeBlock puts the copy button in a header row), never over content.

Browser controls that ignore the design

A native file input says “Choose file / No file chosen” in the browser’s language, and a textarea’s resize grip draws lines and squares one corner.

  • Hide the native file input and press a Divan button instead (a <label> for a visually hidden input); say what was chosen in a caption.
  • Textareas grow with their text (field-sizing: content) and never show a grip. pnpm divan:lint flags a visible file input.

A sticky header that stops sticking

position: sticky only works while no parent clips with overflow-hidden (or overflow-x-hidden): that parent becomes the scroll box, and the header scrolls away with the page.

  • Wrap pages in overflow-x-clip, which clips without becoming a scroll box.

A long list drawn all at once

Thousands of comment cards built at once make the page slow to open, heavy to scroll and slow to filter, most of all on a phone.

  • Draw a list in steps: the first screens, then more each time an end marker comes near (an IntersectionObserver, with a Show more button as the fallback), starting again from the top when the filters change.
  • Say how many are drawn of how many (“Showing 40 of 150”).

A phone card that puts every label above its value

On phones a DataTable with stack shows each row as a card. The card put each column’s name on one line and its value on the next, so one event of Live’s feed (what, page, from, country, device) took ten lines, and three events filled the screen.

  • Lay a card’s facts out as a two-column list: the label in a narrow column, the value beside it (grid-cols-[auto_minmax(0,1fr)] on the <dl>). DataTable’s stacked cards do this now.
  • Measure a card on a phone with real data: a row of five short facts is about five lines.

Things that only fit on desktop

Absolutely positioned pieces collide at 375px: a floating card lands on top of the field next to it.

  • Lay content out with grid or flex; use absolute positioning only for decoration (pointer-events-none, aria-hidden).
  • Check 375px wide before anything else.

Text that refuses to shrink

A flex or grid child keeps its full text width, so a long name or handle pushes the row (and the page) wider than the screen.

  • Give the text child min-w-0, and truncate when it should stay on one line.
  • Long ids, e-mails and URLs get break-all; short code tokens get whitespace-nowrap.
  • In a row that wraps (flex-wrap) with a button or a state after the text, min-w-0 alone lets the text part shrink to nothing: a state that does not wrap (a Status) then runs under the button, and a truncated name shows as “@…”. Give the part a floor too (basis-48, or min-w-40 on a grid part), so the button moves to the next line instead.
Wrong
maryam.kamali.supporter.since.round.one@gmail.com Connected
Right
maryam.kamali.supporter.since.round.one@gmail.com Connected

Buttons that stretch

In a flex-col every child stretches, so a single button becomes a full-width bar.

  • Put items-start on the column, or wrap the button in a div.
  • Full-width buttons only on purpose: the main action in a phone sheet or at the end of a form.
Wrong
Right

Wide tables

A table wider than the phone scrolls the whole page sideways.

  • <DataTable> sits in its own card with overflow-x-auto and scroll-fade-x, so it scrolls inside it and the edge fades to show there is more.
  • Give minWidth only what the columns need: a table of two or three short columns fits a phone without one.
  • Tables of text (several sentences per row) use stack: on phones each row becomes a card.
  • Keep the first column short; put long text in the middle.
  • On a public page, a table of short columns drops its secondary ones below 640px (max-sm:hidden in the column’s class and headClass) and lets long names wrap on phones (wrap-anywhere): in a table, a name that cannot wrap (truncate, whitespace-nowrap) holds its column at its full length whatever its max-width, and widens the whole table.
  • A grid of cards gets a column that can shrink (grid-cols-[minmax(0,1fr)]) and wrap-anywhere on its text: one long file path in a pitfall widened the brand book’s whole Pictures and frames group past a 360px screen.
  • A table of words (a Canon file’s table, a proposal’s) wraps at spaces: wrap-anywhere on or around it lets a column shrink below its longest word, and in Studio’s card inside Claude “Winter” broke as “Winte / r”. Its cells get overflow-wrap: break-word, in a box that scrolls sideways; wrap-anywhere stays for a lone long name, a handle or a path.

Scrollbars draw lines

The system scrollbar under a scrolling card is a bright stripe, a line by another name.

  • Scrollbars are thin and in the fill tone everywhere (set in layout.css). Don’t override scrollbar-color.

Small text in fields zooms the page on iPhone

Safari zooms in when a field with text smaller than 16px gets focus, and the page stays zoomed.

  • Use the Input, Textarea and Select components: they use text-body (16px) on phones and text-callout from tablets up.

Hover is not there on touch

Icons or actions that appear only on hover never appear on a phone.

  • Never put the only way to an action behind hover. Hover may add a hint; the action is visible or in a menu.
  • Mirror hover reveals with group-focus-visible for keyboards.

The first screen doesn’t fit

A big title fits a tall phone but pushes the content off a short laptop or a phone held sideways.

  • The display style is capped by the screen height (svh) already: use it rather than a fixed size.
  • Check 1280×720 and a phone held sideways.

Small touch targets

Text links and 24px icons are hard to hit with a thumb.

  • Main actions are at least 40px tall (Button default), compact ones 32px (size="sm"), never smaller on touch screens. pnpm divan:lint flags size="xs" and size="icon-xs" (button-too-small).
  • A text button in a table row (“show only this source”) is still a button: give it min-h-8 and some padding, so the row’s name is something a thumb can hit.
  • Icon-only buttons always have an aria-label.

Grid tracks that grow past the screen

A grid item keeps min-width:auto, so a row with unwrapped text (truncate, whitespace-nowrap) widens the whole track. A clipping parent then hides the overflow instead of scrolling, and the end of every row is cut off.

  • Give grids of rows grid-cols-[minmax(0,1fr)], or min-w-0 on the items.
  • Look for content cut off inside overflow-hidden or overflow-clip parents, not only for pages that scroll sideways.
  • This also hits a lg:grid-cols-2 grid (below lg it is one automatic track), the form grid inside a Sheet, and a DataTable whose toolbar holds a segmented control: pass class="grid-cols-[minmax(0,1fr)]" to the DataTable.
  • And a list laid out as a grid (<ol class="grid gap-1">): the overviews’ best posts and the Trends lists ran past their cards on phones and lost their numbers. The same lists on the public site and in the brand book (top supporters, the rules, the pitfalls) went unchecked while the lint rule looked only at the backoffice and Studio. pnpm divan:lint now flags a <ul> or <ol> grid with no columns on every page, class={cn('grid', …)} included (list-grid-auto-column).

Sections waiting to be drawn widen the page

A section below the first screen waits to be drawn (content-visibility: auto). contain-intrinsic-size: auto 40rem holds a width as well as a height, so every waiting section counts as 640px wide: the grid column grows to it, a clipping parent hides the overflow, and on a phone the text runs off the screen. A test that forces every section to draw does not see it.

  • Use the defer-render utility: it holds only the height (contain-intrinsic-block-size). pnpm divan:lint flags contain-intrinsic-size.
  • Give the grid that holds the sections grid-cols-[minmax(0,1fr)], so no child can widen it.
  • Check phones the way a phone draws the page: load it at 360px and scroll to the end, without forcing sections to draw.

A note's dot drifts in centred text

When a Note wraps in a centred layout, its text takes the full width and the dot ends up at the far edge, away from the words.

  • Use <Note align="center"> in centred layouts: the dot then sits inline with the first word.

A list and its open item stacked on a phone

An inbox with a list beside the open conversation stacks both on a phone: the person taps a name and the conversation opens below a screenful of list, out of sight.

  • Below the lg breakpoint show one at a time: the list, or the open item with a Back link to the list (keeping the filters).
  • Open the thread at its newest message, and keep it there while pictures load, until the person scrolls up.

A row you press that does nothing on a phone

A DataTable with stack shows each row as a card on phones, but the cards did not take the table’s onRowClick: on a desktop a post opened its own view, on a phone the same post did nothing and gave no sign why.

  • A stacked card takes the same press as its row (DataTable does this now), and a row you can open also has a real link in its first cell, so a keyboard and a screen reader reach it.
  • Press a row at 360px as well as at 1280px.

A grid section that grows to its widest child

A section built as grid gap-3 has one column that is as wide as its widest child. Put a row of five range buttons in it and the whole section, its stat tiles included, grows past the phone’s edge: the page scrolls sideways by 26px and the right tiles are cut off.

  • Give a grid section one column that can shrink: grid-cols-[minmax(0,1fr)], and let a row of controls scroll inside itself (the segmented control already does, with max-w-full).
  • A flex box that holds such a row (the actions of a page header, a label with its control) needs the same: min-w-0 max-w-full, or its width is the whole row of buttons and it pushes the page sideways.
  • Check with the overflow snippet at 360px after adding any row of buttons, tabs or chips to a grid.

A card that cuts off its own content

A card’s content laid out as grid gap-5 has one column as wide as its widest child. A text area (it grows with its text) or a row of three option cards made that column wider than the phone, and the card, which hides what spills out, cut the text and the options off at the edge: nothing scrolled, so it looked fine and was unreadable.

  • Give a card’s grid a column that can shrink: grid-cols-[minmax(0,1fr)].
  • pnpm divan:lint flags a Card.Content grid with no columns (card-grid-auto-column).
  • Check each card at 360px with its longest text in it, not only that the page does not scroll sideways: a card that hides its overflow will not make the page scroll.

A button label that runs out of its capsule

Buttons keep their label on one line (whitespace-nowrap). In the studio viewer’s two-column grid of actions, “Remove from favorites” was wider than its column, so the words ran past the button’s fill and over the next one.

  • A button in a narrow column (a grid of actions, a sheet’s side panel) gets wrap: the label breaks onto a second, balanced line and the capsule grows with it.
  • Keep labels in such grids short (“Favorite”, “Favorited”), and leave the long wording to the button’s aria-label or a tooltip when it needs more.

A floating panel that touches the edge of the screen

On a phone the studio’s Model settings panel sat flush against the side of the screen, and when it opened upwards its title ran off the top. The shared Popover, menu, Select and Tooltip parts were placed with no room kept at the screen’s edges, and the Popover never limited its height.

  • Every floating part keeps clear of the edges: the shared content components set collisionPadding (12px) by default, so a panel shifts inwards instead of touching the side.
  • A Popover is no taller than the room it has (max-h-(--bits-popover-content-available-height)) and scrolls inside, like menus and Select already did.
  • Fix it in the shared component, never page by page; tests/brand.test.ts checks that every floating part passes collisionPadding.

A label that breaks onto two lines beside a long value

Studio models in the backoffice listed “Worker key” beside “Set, used without a team account”. In Persian the label column gave way to the long value and «کلید ورکر» broke into two lines of one word each, so the label no longer read as one.

  • A label beside its value keeps to one line: whitespace-nowrap on each <dt>, and grid-cols-[auto_minmax(0,1fr)] so it is the value that wraps.
  • pnpm divan:lint flags a <dt> without it in such a list, on any line of it (label-wraps). It once read a list one line at a time, so lists written a row a line slipped past it: Dabir’s proposal cards and the backoffice’s evals had labels that could wrap.
  • Keep the labels short, and look at the longest value in both languages on a 360px phone.

A sheet that closes with the side drawer

On a phone the studio’s workspace menu sits in the side drawer. Its New Company item closed the drawer, as every item there does, and then opened a sheet the menu itself held, so the sheet went with the drawer and nothing opened. On a computer, where the menu is in the side panel, it worked.

  • Mount a sheet once in the layout, outside the drawer, and open it through shared state (newWorkspace and newCompany in #lib/studio/organise.svelte.ts).
  • pnpm divan:lint flags a component that takes onnavigate (the drawer’s close) and holds its own Sheet or Dialog (sheet-in-drawer).
  • On a phone, choose every item of every menu in the drawer.

A field sized by hand

Pages gave their fields a height or a text size of their own (h-10, h-11, text-body): to match a button, or to keep iPhone from zooming in. When Divan became compact (36px fields, 14px text), 56 fields in 18 pages kept the old height and stood taller than the buttons beside them, and a composer kept 16px text on a laptop.

  • Leave a field’s height and text to its component: Input, Textarea, Select and NativeSelect are 36px with text-callout, and a Button beside them is the same height. Set only the width (w-24, flex-1) and, for a growing textarea, min-h or max-h.
  • Never raise a field’s text to stop iPhone zooming in: layout.css keeps every field at 16px on touch screens by itself. pnpm divan:lint flags a field sized by hand (field-size-by-hand).
  • A page’s main box is a field too, and keeps the field’s text: the link assistant’s request and Getting started’s idea box were text-body. The lint reads each field’s tag whole, so a class on a line of its own counts (a code field kept h-8 that way).

A sheet fixed inside a section that waits to be drawn

A part that covers the screen on a phone without a portal (RoomPanel’s full-height sheet) put inside a section that waits to be drawn (defer-render: content-visibility: auto) is fixed to that section, not to the screen: such a section, like one with a transform, a filter or contain, holds what is fixed inside it. The sheet shows clipped to the section, and the page scrolls under it. The brand book’s own examples sit in such sections.

  • Mount a part that covers the screen in the page’s own flow, beside the view it belongs to (RoomPanel beside the room’s chat), never inside a section with defer-render, contain, a transform or a filter.
  • A part that may be mounted anywhere is portaled to the body, as Sheet and Dialog are.
  • Open it on a 360px phone and scroll: it covers the whole screen, from top to bottom.

Things to compare, one under another on a phone

A shot’s page shows its takes side by side, played in sync, so they can be compared. Its gallery’s narrowest tile was 10rem: on a 360px phone that left room for one, so each 9:16 take filled the screen’s width and three of them ran 1,700px down the page, nothing beside anything.

  • Size a gallery of things people compare for two in a row on a 360px phone: --tile: 8.5rem for 9:16 takes (ShotTakes.svelte).
  • Open such a page at 360px with three of them: two sit side by side.

A field squeezed beside segments

On a phone, the Find field of the Canon’s canvas shrank to a third of its row beside the line filters, its placeholder cut, because what sits in a flex row shrinks before the row wraps.

  • A field that shares a row gets a minimum width and grows on phones (min-w-48 flex-1, a fixed width from sm:); the segments then wrap to a line of their own and scroll inside their track.
  • On a 360px phone, every field shows its whole placeholder.

Two offsets for one jump

Pipeline’s How pipelines work landed Getting started’s #how 136px below the top, with nothing above it to clear: the page’s own scroll padding (72px, for the header) and a scroll margin on every section with an id (64px) added up. The legal pages, the brand book’s topics and a person’s notes in the backoffice had a margin of their own on top (scroll-mt-20, scroll-mt-24).

  • Clear the header once, for every jump on the page: html’s scroll-padding-top in layout.css, with room to spare (6rem under the 56px header), as a page can still shift a little while it settles. Give the target no scroll margin of its own.
  • Only inside a scroll area of its own (the room’s chat), where the page’s padding does not reach, may a target keep a margin, marked with divan-ignore and the reason. pnpm divan:lint finds the rest (jump-offset-twice).

Layout and grids

A grid that ends with an empty slot

Seven cards in a three-column grid leave one card alone and a hole beside it, and the page looks unfinished.

  • For a set whose count you know, use the tiles utility (items wrap and the last row grows to fill) or a column count that divides the items. A collection that grows with what people make uses gallery (see “A lone card stretched across the page”).
  • Pin a card’s actions to its bottom (a flex column with mt-auto) so the buttons of a row line up.

Board columns as tall as their cards

Columns in a board that fills the screen but are aligned to the top (items-start) are only as tall as the cards they hold: a list with two cards is a short stub, and the board looks shrunk even with room to spare.

  • In a board that fills the screen, columns stretch to its full height (items-stretch); each column’s cards scroll inside it and the add-a-card field stays at its bottom.
  • Give the lists a minimum height (md:min-h-72) so a short laptop scrolls the page instead of squeezing the cards, and keep what sits above and below the board short (see “A board squeezed by what sits around it”).

A menu grouped by network, not by what you are doing

A side menu with one group per network (Instagram, YouTube) repeats the same names (Overview, Audience, Posts) under each, scatters one job (teaching the AI: persona, reply settings, DM replies, prompts) across three groups, and hides that two pages answer the same question.

  • Group a menu by what a person is doing: answering people, knowing the audience, publishing, reading how it went, running the community, setting up the assistant.
  • Where a group mixes networks, the label names it (“Instagram audience”, “YouTube videos”), so a label is clear without its heading.
  • Define the menu once (src/lib/backoffice-nav.ts) and draw the side menu, the phone drawer and the Home page from it; a test fails when a page is not in it.

Headings that end with one word

A heading or a sentence whose last line holds one word (“far”, “است.”) looks like a mistake and breaks the rhythm.

  • Headings balance their lines (text-wrap: balance) and paragraphs avoid orphans (pretty): the base styles do it, so don’t fix line breaks with fixed widths or <br>.

Breakpoints that forget the side menu

Next to a side menu the page is narrower than the window: at 768px it is under 480px. Columns switched on by sm: or md: answer to the window, so three numbers or two rows side by side squeeze until a number breaks in the middle and a title runs over its status.

  • Make the column beside the menu a container (@container) and switch its grids with container variants (@xl:grid-cols-2, @2xl:grid-cols-3): they answer to the space the part really has.
  • Check a page with a side menu at 768px, the narrowest width that shows the menu, in both languages.

A filled row without its padding

An Item row has a fill (muted) unless it is plain. With its padding taken away (px-0) to line it up with a card’s title, its icon and its status touch the edge of the fill.

  • Keep a filled row’s padding. To line a row up with the text around it, use variant="plain": it has no fill, so no edge to touch.
  • pnpm divan:lint flags an Item.Root with p-0 or px-0 that is not plain.

A form that opens above a view that fills the screen

A panel opened in the page above a board, table or chart (Manage lists, Add list) takes its height from the view, which is sized to the screen: the board’s lists shrink to a few lines and scroll inside a sliver.

  • Tasks open in a Sheet (from the end side beside a side menu); the view keeps the whole screen.
  • Fields for one thing that is edited in place (a list’s title) open in the same kind of Sheet, not inline in the column header.
  • Check the view with every panel and form open, on a short laptop and a phone held sideways.

A table whose action falls off the edge

A table wider than the page column scrolls sideways inside its card, and the last column, the one with Block or Unblock, is the one you cannot see.

  • Fit the columns to the column the page has (about 880px beside the side menu): fold a second fact into a cell as a faint line (“3 replied” under the comment count) instead of another column.
  • Measure it: the card’s scrollWidth equals its clientWidth at 1280px. A page with a wide table is marked wide in the layout.
  • Where people choose the columns (Link builder), put the row’s action right after its name, so it shows however many columns are on. scripts/ui-audit.js lists how far each table scrolls (tables).

A table cell that prints [object Object]

renderSnippet(snippet, params) hands the snippet an object. A string or a number (row.original.name, 'text') is not one, so the cell prints [object Object] instead of the value, or NaN (and “NaNd ago”) once the snippet formats it as a number or a date.

  • Pass the row (renderSnippet(cell, row.original)) or an object ({ value }), and take it in the snippet as {#snippet cell({ value })}.
  • Open the table in the browser: a cell that reads [object Object] or NaN is this. Run pnpm divan:lint before opening it: the rule table-snippet-needs-object finds the common forms. It now flags any second argument that is not an object literal, row.original or a plain variable: a fallback (row.original.utm.source ?? ''), a ternary (row.original.loaded ? … : null) or a call (String(getValue())) printed [object Object] in three Link builder columns and the Donations contact column.

A text area that ignores rows

The Textarea grows with what is typed and has a minimum height of 6rem, so rows={3} or rows={8} changes nothing: the box in the link assistant stayed a small strip however it was set, and a long request scrolled inside it.

  • Size it with a minimum height class (min-h-56 for the main box of a page, min-h-36 for a note) and let it grow from there; rows is only the fallback.
  • Its text stays the field’s own (text-callout, and 16px on touch screens by itself: “A field sized by hand”), and the main box of a page keeps its resize handle off (resize-none): it grows by itself.

A table with many columns in the narrow column

More columns in the table of links, kept in the 896px column beside the side menu, would either squeeze every cell or scroll the one column you wanted out of sight.

  • A page built around a wide table is marked wide in the layout (max-w-none); keep any form or text on it to a readable width (max-w-5xl).
  • Let the person choose the columns (a Columns popover with Checkboxes) and keep the choice in the browser with Persisted; the first column always stays so a row can be told apart.

A lone card stretched across the page

The studio’s All projects page laid out its cards with tiles. With one project, the last row was the only row and the card grew to the page’s full width: a 16:9 cover as wide as the page, under one short name. Home’s projects and a folder’s folders did the same.

  • Lay out a collection that grows with what people make (projects, folders, shots, team palettes) with the gallery utility: every card keeps one size, and the last row may end short.
  • Keep tiles for a set whose count you know (rules, colours, the composer’s options), where a last row that fills up looks finished.
  • A fixed set can still end on one tile stretched across its row: the composer’s five tiles came out 4 and 1, Lighting as wide as the four above it. Give such a set a grid whose columns divide it by the container’s width (grid-cols-2 @md:grid-cols-3 @4xl:grid-cols-5) and let the last tile span what is left of its row.

A part of a scrolling sheet that collapses on a phone

On phones the studio’s viewer lays its picture above the details, and the sheet scrolls as one column. The picture’s part had min-h-0, so the column shrank it to 24px and the picture spilled over the details below: Animate, Recreate, Download and the stage switch lay under it, and Previous and Next sat on top of the stage. On a computer the two parts sit side by side and nothing showed.

  • In a column that scrolls as a whole, give each part shrink-0: min-h-0 belongs only on a part that scrolls itself (overflow-y-auto).
  • Where a layout changes at a breakpoint, move the size rules with it: md:min-h-0 md:flex-1 md:shrink for the side-by-side layout, shrink-0 below it.
  • Open every sheet on a 360px phone and scroll it from top to bottom.

A list of settings laid out as a grid of cards

Studio models in the backoffice showed each platform as a card in a three-column grid. Cards in one row grew to the tallest, so their Connect and Manage buttons sat at different heights; every card repeated “Team” before its status, on a page only about the team; and “Set, used without a team account” ran past the edge of the OpenRouter card and was cut off.

  • Lay out a list of things to set up as rows in a card (Item, from the Cards and lists topic): the name, one line of detail under it, the status at the end. A row that opens a sheet is a link to it (?platform=openrouter), so the address says what is open.
  • Group the rows by what they mean for the person (made with today, ready to connect, not available) instead of saying it again on every one.
  • Keep a status to a word or two (Connected, Worker key in use); the sentence that explains it goes in the sheet.

A separator that loses its space at the edge of a block or a tag

On the studio’s Company page a person read “founders@divanworks.com ·Owner”: the “ · ” was the last thing inside {#if}, and Svelte drops the spaces that end a block, so the dot ran into the next word. The studio’s Trash then read “Trash· Films” the same way: the dot opened a <span>, and Svelte drops the space that opens or closes a tag too.

  • Write a separator inside a block, or at a tag’s edge, as an expression: {' · '} (<span>{' · '}{name}</span>); or put it outside the block or the tag.
  • pnpm divan:lint flags a separator followed by spaces right before {/if}, {/each} or {:else} (space-before-block-end), and a space that opens or closes a tag beside text (space-at-tag-edge).

An icon that touches its word in a segmented control

The studio’s canon sheet put an icon before each kind (Character, Place, Voice …) in a segmented control. segment() had no gap, so each icon sat against its word; one backoffice filter had added gap-1.5 by hand.

  • segment() spaces an icon from its word (gap-1.5) for every segmented control now: put the icon straight in the segment, with no margin of its own.
  • When a component lays out an icon and a word together, the space between them belongs in the component, not at each place it is used.

A filter far from what it filters

A line’s space in the studio put the review filter (Any stage, In review …) at the top of the page, above the scenes and the canon, while it only filters the list of work at the bottom: pressing it changed nothing in sight.

  • Put a filter right above the one list it filters, in the same row as that list’s heading.
  • When a page gains sections above a list, move the list’s filter down with it.

Rows whose cells shift or run together

The studio’s Overview listed the story and each of its lines with its stage and what is left. The story’s row had no count, so its stage slid to the end and the column zigzagged; on the Pipeline board, “3 left” and the lead’s address sat side by side with nothing between them and read as one.

  • In a list of rows, each part keeps its column: give a status or a count a fixed width, and leave its slot empty when a row has nothing for it.
  • Two values on one line get a separator between them (a · with aria-hidden), or a line each.

The account at the foot of the side menu

The studio and the backoffice put the language switch, the person’s email and Sign Out under the side menu: on a short screen they took the menu’s room, so it scrolled sooner, and on phones they showed twice, in the drawer and again under the page.

  • Put them at the end of the header, on every width: a ghost button naming the other language in that language (English, فارسی), and the person’s initial (Avatar) opening a menu with their email and Sign Out (destructive).
  • Use AccountMenu (src/lib/components/backoffice/AccountMenu.svelte): on phones at the end of the glass bar, from 768px in a header in line with the side panel’s logo.
  • The side menu holds only where to go.

An address cut off in a half-width field

The New Company sheet paired its fields two by two. At the sheet’s 28rem, the billing e-mail kept half of it and showed “founders@divanworks.c…”, so nobody could read the address they were about to send.

  • Give fields that hold an e-mail address, a website or a link the full width of the form.
  • Pair only short fields: a country, a size, a role, a number.
  • Check a two-column form at its narrowest, with the longest value each field will hold.

A board squeezed by what sits around it

The board made itself as tall as the screen minus 4rem, the layout’s spacing when it was written. When the account moved into the layout’s header, the page grew 3rem taller than the screen and scrolled. On a 1360×680 laptop with Select Cards on, the rest went to its surroundings: the group’s name and the lead, three rows of filters and buttons, the picking hint above the board, three lines of description on each list, and a bar fixed over the bottom with a padding that guessed its height. Each list showed less than one card.

  • Mark the page’s root data-fill-screen: the backoffice layout then gives it exactly the height its header leaves. A page never writes calc(100svh-…) with the layout’s sizes; pnpm divan:lint catches it.
  • A bar that comes with a mode (the actions on picked cards) is part of the page’s column, under the board, never fixed over it with a guessed padding: the board gives it its real height, and on a phone, where the page scrolls, it sticks to the bottom (sticky bottom-3). The mode’s hint goes in that bar while nothing is picked, not above the board. On a page that scrolls, the same bar is sticky too.
  • Spend little height on the header: SectionHeader fillsScreen puts the actions in the title’s row, and on a short screen (the short variant, under 760px tall) hides the group’s name (the side menu shows it) and the lead; list descriptions keep to one line there, and the add-a-card field rests while picking.
  • Look at the board on a 1360×680 laptop with every mode on and one card picked, in Persian: the page does not scroll and each list shows about two cards.

A docked bar that hides the last row

The studio fixed its docked composer over the bottom of the screen and padded the page by a guess at its height: 288px on phones, 256px from 640px. A long prompt or a row of references makes the composer taller than the guess: on a 1360×680 laptop the last row of Generations stayed 32px under it with a long prompt and 151px with four references, and 120px on a 360px phone. The bar for picked shots was fixed the same way with no room at all: on Home it hid 112px of the last row. With an empty prompt, a phone lost 127px to empty space instead.

  • A bar that belongs to the page (a docked composer, the actions on what is picked) is the last thing in the page’s column and sticks to the bottom of the screen (sticky bottom-3, with mt-6 sm:mt-8 above it): its own height is the room it takes, whatever it holds. pnpm divan:lint catches a bar fixed across the bottom (fixed inset-x-0 bottom-0).
  • Make that column fill the screen (flex min-h-svh flex-col in the layout, flex-1 flex-col on the page’s main, flex-1 on its content), so the bar still sits at the bottom of a short page; the page’s bottom padding is then only the bar’s distance from the edge (pb-3).
  • Never pad a page by a bar’s guessed height. A bar that has to float over a view that fills the screen measures itself (a ResizeObserver writing a CSS variable), and the view pads by that.
  • Check it with the bar at its tallest: on a 360px phone and a 1360×680 laptop, in both languages, write a long prompt, add several references, then pick a shot, and scroll to the end each time: the last row is whole above the bar.

A switcher that says the same name twice

The studio’s workspace button read “DivanWorks / DivanWorks” (the company over its workspace of the same name), and its menu said it again: the company as a label over its only workspace.

  • Show the second line only when it says something the first does not: the company under the workspace only when their names differ.
  • Name the groups of a list only when there is more than one: company labels only for someone in two companies or more.
  • A link the side menu already has (Company) is not in the switcher too.

A sign-in laid out unlike its app

The studio’s and backoffice’s sign-in stacked the logo, the app’s name and a line above the card, and put the language at the bottom as a switch, while the app once signed in, and the account page, have it at the end of a slim header. At 1280×800 the column ran from the window’s top edge to its bottom.

  • Lay a sign-in out like its app: a slim header (the app’s name at its start, the language at its end, as AccountMenu shows it), and one centred card with its heading inside.
  • Use the one sign-in part and card (SignIn.svelte in a Card) on every app, so the three sign-ins look alike.
  • Look at it at 1280×800 and on a 360px phone: it fits with room around it, and a long heading takes the smaller size on the phone.

A side menu whose parts look alike

The studio’s side menu drew everything as the same gray row: the step back, the level’s name, the sections (Overview and Canon, then the story and its lines, then Trash) set apart only by a little space, with no label to say what each held. People could not tell where they were, what a row would open, or which rows belonged together. Each app’s menu (studio, backoffice, account, brand book, the site’s drawer) had also been made by hand, with its own sizes and its own colour for the page you are on.

  • Draw every side menu and drawer with SideMenu (#lib/components/ui/side-menu): SideMenu.Title for a level below the top (a step back named after the level above, then the level’s name), a label on every section after the first, the foot section for Trash and Settings.
  • Rows read in the foreground with muted icons; the page you are on is the one copper row (current); a row that makes something is copper with no fill (action); a row that opens a deeper level ends with a chevron (opens).
  • pnpm divan:lint flags a hand-made menu row (side-menu-row): a rounded-field row coloured by aria-[current=page]:bg-…; use SideMenu.Item, or sideMenuRow() for a row with parts of its own.
  • The menu fills the rest of its panel (flex-1 inside a flex column), never min-h-full: below the panel’s header, min-h-full makes it as tall as the whole panel, and the foot section (Trash, Settings) falls out of the bottom by the header’s height.
  • One copper row per menu. A list nested under a row (a line’s folder tree) marks a place only deeper than that row: at the line’s top the line’s own row is the copper one, not its “All shots” as well.

Text squeezed beside its buttons

In a row that wraps (flex-wrap), text given flex-1 has no width of its own, so the row never wraps: on a phone the buttons and statuses beside it keep their line and the text is squeezed to a word or two a line (a name in Trash beside Restore and Purge, a guide step beside its button, a connection beside its status).

  • Give the text that grows a width to wrap at: flex-1 basis-40 (basis-60 for a paragraph). When the row is narrower than that and what is beside it, the buttons go under the text instead.
  • Item.Content does this by itself (basis-40); a row made by hand needs it.
  • On a 360px phone, paste the squeeze check (brand.divanworks.com/pitfalls) in the console: it lists text in a wrapping row that is narrower than 140px and taller than a line.
  • It came back in the studio (a folder’s “Scene 1” beside Upload and New Folder, the Releases and Projects titles), so pnpm divan:lint now flags flex-1 with no basis (or min-w) straight inside a flex-wrap row (squeezed-beside-buttons).
  • A row that does not wrap squeezes the same way: the composer’s note sat beside its kind switch, and in a shot page’s generator column and on a phone it shrank to three words a line. Its row wraps now and the note has basis-60, so it goes under the switch where the two do not fit side by side (Composer.svelte).

An explanation cut at two lines

Item.Description shows two lines at most, for a row’s short detail (a handle, a date, a role). An explanation put there (how to get a key, what a rule means) loses its end behind an ellipsis, and on a phone that is most of it.

  • Keep Item.Description for a short detail. When a row’s description explains something, pass class="line-clamp-none" so it shows whole.

A part’s contents opened among its siblings

Inside a project the studio’s side menu listed the story and all seven lines, and opened the line you were in with its folder tree under its row, among the others. The menu held two levels at once: the other lines pushed the line’s own folders down, and nothing said that its Pipeline (a tab on its page) was the line’s.

  • A part with pages of its own (a project’s line, its story) is a level of its own: its row opens it (opens), and its menu holds only what is that part’s (its work, its pipeline, its releases, its folders, its own Trash) under a step back to the project.
  • Pages of a part that were tabs on its page (Work, Pipeline, Brief) become rows in its menu, each at an address of its own; the old addresses lead there.
  • Every row of a part’s menu keeps you in the part: its Trash too is a page of the part (/projects/<id>/<line>/trash), not the studio’s Trash, which would turn the menu back to the studio’s.

A deep page that does not say where it is

A folder in a line of a project showed “Project › Films › Scene 1” above its title and the other pages showed nothing; for someone in two companies and several workspaces, nothing on the page said which company and workspace it was in, and the side menu, one level at a time, cannot say it.

  • Start every page with Breadcrumbs: the company, the workspace, then each place down to the page itself, the last step in the foreground and every other a link.
  • Say each name once: a company and its workspace of the same name are one step.
  • One address per page, drawn by the layout at its top: a page draws none of its own beside it.

A folder tree that starts further in than its menu

A line’s side menu put its folders under Work, Pipeline and Releases, but every folder row kept an empty slot for an open-and-close arrow before its icon, so the folders’ icons and names started further in than every other row, as if they were inside Releases.

  • A tree in a side menu starts its rows where the menu’s rows start (sideMenuRow, with the same icon size): only a folder inside another steps in.
  • A branch’s open-and-close arrow points down (up when open): a chevron forward at a row’s end means the row opens a deeper level. It takes the icon’s place (SideMenu.TreeItem), never a slot after the count (pitfall “Counts and buttons out of line”).

A sheet opened from inside another sheet

The studio’s viewer (a sheet) opened Move to and Use in (another sheet, mounted once in the layout) on top of itself. Which of two open sheets is in front follows where each sits in the page, not which opened last: the second sometimes opened behind the viewer, and a press meant for it fell through to the viewer’s Upload a New Version, or its first press went nowhere.

  • An action in a sheet that opens another sheet closes the first one before it opens the second (close(); openMove(ids)), as the viewer’s other actions already did.
  • A sheet that belongs inside another (a share sheet, a picker) is mounted inside it, after its content, so it is always in front.
  • From inside each sheet, press every action that opens another one, at a phone width too: only one sheet is open, and its first press counts.

A button stretched across its field

A canon item’s Pick from the Canon sat in the middle of its sheet, under the pictures, apart from everything else that starts at the side: it was a Field’s own child, and a Field stretches each child across it (*:w-full). Its justify-self-start did nothing, since a Field is a flex column, not a grid.

  • A button that is a Field’s own child keeps its own width at the field’s start: w-auto! self-start. Or it goes in a row with what it belongs to, like the label row (SignIn’s Show).
  • Open each form with a button inside a field, in both languages: the button starts where the label starts.

A new way added beside the old one

The founders asked for the Canon to be one free directory of files. It was built as a Files page beside the old Canon page with its shelves, plus a Story page for one of its files and a History page: four places for one thing, and the structured page people opened first stayed as it was.

  • When a new way replaces an old one, replace the old page in the same change: one place for the thing (the room: its tree in the side menu, the open file beside it), and every old address leading there.
  • Before building, read the people’s own words again (simple, unstructured) and check the first screen they will open against them.

A text shown as its Markdown

The Canon’s file editor showed each text as Markdown in a plain box (## for a heading, ** for bold), with Write, Read and Side by Side tabs to see it as it reads. Writers read signs instead of their story, and switched views to check what they wrote.

  • Show a text as it reads and let people write there: a heading looks like a heading, a list like a list. Markdown is what is saved, under the page (RichText.svelte), and there is one view only.
  • Markdown typed at the start of a line (## , - , 1. , > ) turns into what it means; a bar above the text does the rest (heading, bold, italic, lists, quote, link).
  • A model’s answer is Markdown too (the Dabir Room’s spike page first showed Dabir’s answers with their backticks and list dashes): draw Dabir’s and any agent’s words with renderMarkdown (src/lib/studio/markdown.ts), which also makes each path of the Canon a link to its file, never as plain text in a whitespace-pre-wrap paragraph.
  • The same holds outside Svelte: Studio’s card inside Claude (an MCP App) first showed a proposal’s text in a <pre>, a table as its pipes and dashes. Its server makes the text with renderMarkdown and sends it in the result’s _meta (src/lib/server/studio/connector-card-app.ts); the card styles each element by name, since utility classes do nothing in its frame.

Adding only from somewhere else

The Canon’s tree listed every folder, but a new text or folder could be made only on a folder’s own page, and Dabir, the story’s agent, could only propose a new text for the writer to accept. People asked for folders and files to be added where they are, by them or by the agent. Later (2026-11-22) the founders made the Canon’s structure the platform’s: nobody makes, renames or moves its files and folders by hand.

  • Put the way to add on the thing itself, and open what is made at once: in the Canon that is the rung in Contents (New Shot After), an item’s sheet, a file’s Make, and New Skill and New Type on Rules and skills.
  • Where the platform owns the structure, nobody picks a folder: Studio places a new text by its code or its type (src/lib/studio/structure.ts), and the agent proposes it (create_file, insert_after) for a person’s yes. There is no New Folder, Rename or Move in the Canon, and no create_folder.

A step back that looks like a section’s label

The studio’s Projects menu read “‹ Studio”, “Projects”, “+ New Project”, “All projects”, then the projects. The step back and the label “All projects” were the same small gray words, so people could not tell which one to press; “Studio” said the app’s name the panel’s header shows just above, not where the step led; and “All projects” said the title again. The backoffice’s section labels (Reply, Audience) were one size away from its rows and read as rows that do nothing.

  • Three things that never look alike: the step back is a gray capsule (SideMenu.Title draws it with Button variant="secondary"), a section’s label a quiet heading (text-caption font-semibold text-faint, no icon), a row the foreground with a muted icon.
  • Name the step back after where it leads. The studio’s own menu is the workspace’s (its switcher sits at the top), so the step reads ‹ DivanWorks, never ‹ Studio under the Studio of the header.
  • A label never says the title again: under Projects, New Project and the projects are one section with no label; only what differs (Shared with you) gets one.
  • Never hand-make a section’s label (the studio’s Folders was a <p> of its own, with its own button): SideMenu.Section label={…}, the button in its action snippet. pnpm divan:lint flags a hand-made one (side-menu-by-hand).

Long names that push the side menu down

Side-menu rows wrapped their words (wrap-break-word), so a project named with a sentence took three lines, the level’s title four, and every row below moved down by as much. The breadcrumbs at the top of the page wrapped the same way.

  • Every side-menu row is one line: a long name (a project, a folder, a file) is cut short with an ellipsis and shows whole on hover, only while it is cut. SideMenu.Item does it; a row with parts of its own puts its words in sideMenuLabel with {@attach wholeWhenCut}. The level’s title keeps two lines (line-clamp-2).
  • wholeWhenCut (#lib/cut-short.ts) sets the title on hover only when the words overflow, so a short row has no tooltip and a screen reader still reads the whole name from the page.
  • Each step of Breadcrumbs is at most 15rem, cut short the same way.
  • Our own words are written to fit the 224px panel in both languages; only names people type are ever cut. pnpm divan:lint flags a hand-made row’s words that wrap (side-menu-by-hand).

Side panels of different widths

The backoffice’s side panel was 208px and the studio’s 224px, with the page 20px and 16px away: the same menu changed size from one app to the next, and a label that fit in one could be cut in the other.

  • Every app’s desktop panel is md:w-56 (224px) at md:start-3 with its menu at mt-3 px-2.5 under the header, and the page starts at md:ms-63.

One place shown twice

The room’s side menu opened with All Files above the Canon’s tree, which leads where the tree’s own top does, and each file’s page showed its path (Canon / Bible) above its name, though the tree beside it already showed where it was.

  • Show where a person is in one place: the side menu’s tree. No path above the title, no menu row that leads where the tree does.

A picker whose job is not said

The room’s side menu opened with a dropdown of the story and its lines. It chose what Dabir works on (whose rules and skills it keeps to), but it sat above the files, far from Dabir, and nothing said so: the founders could not tell what it was for.

  • Put a picker where what it changes is: Dabir’s line in Dabir’s heading (About The story ▾).
  • Say what it does in a line inside it (the menu’s label), in the words people use.

One thing’s actions split across rows

A file’s page had Make and the file’s menu beside its name, and its labels (Look, Films, Add a Code) and History on a row of their own below: what belongs to the file sat on two rows, and Make, which works from its text, sat away from the text.

  • On a thing’s heading row: its name, then its labels, its History and its menu (… last). What works on the text (Make) goes in the editor’s own bar.

A side menu row for each option of one page

When the line picker left the room’s side menu, Contents got a row for each of the project’s lines: seven rows (Films, Books, Audio, Music, Art, Games, Learn) for one page that only switches what it lists.

  • Give one page one row; put the choice between its options on the page, as a switch (segmented), the way Rules and skills does.

A deep tree that hides its own names

Once the Canon put each coded file in its own code’s folder (Films/WHC/S01/E03/SQ020/SC014/SH0140), its tree in the side menu stepped in a full rem per level: by the sixth level the folder’s name was gone, only its icon was left, and the scene read “SC…”. Capping the depth did not help: each row sits in its parent’s list item, so the steps added up (1 + 2 + 3 …) and grew as the square.

  • A nested tree steps each row in by one step from its parent, for a few levels: nestStep(depth) from #lib/studio/canon-tree.js. A flat list (Contents) steps in by its depth: indentOf(depth, step, cap). Past the levels or the cap the rows line up, and the folders open above them say how deep they are.
  • Read a tree at its deepest real case in the side menu’s width, not at the two levels of a sample.
  • pnpm divan:lint flags padding-inline-start from a depth with no cap (tree-indent-uncapped).

An item that opens inside one of its parts

A project opened straight into its Canon (its files and Dabir), and the side menu showed the Canon’s tree. The project itself (its Overview, its lines, its releases) was one step back that nothing pointed to, and Delete Project sat in a ⋯ menu on that Overview: people could not find either.

  • Open an item at its own page, with its own menu beside it: the parts it holds (a project’s Canon, its lines) are items of that menu, one press away.
  • Put what people do to an item (open a part, rename, delete) on its row in the list too, in a ⋯ menu at the row’s end; delete only for those who may.
  • A row that opens on press takes its menu in a wrapper that stops the press (onclick={(e) => e.stopPropagation()}), so opening the menu does not open the row.

Counts and buttons out of line

In the studio’s Canon and a line’s Folders, a folder with something inside put its open-and-close arrow after its count, and a folder someone may edit kept a hidden slot for its … menu after that. So “Bible 5” stood further in than “Mood boards 0”, every folder’s count further in than Work’s and Releases’, and the + of New Folder lined up with nothing: the column of numbers zigzagged down the menu.

  • Draw a tree’s rows with SideMenu.TreeItem: its controls stay inside the row. The open-and-close arrow takes the icon’s place, the row’s + or … takes the count’s place, on hover, on keyboard focus, while its menu is open, and always on a touch screen.
  • Nothing goes beside a row, after its count: every count of a menu ends at the rows’ end, so they stand in one line with each other and with a section label’s button (New Folder, at the label’s end).
  • pnpm divan:lint flags a row drawn by hand with sideMenuRow() (side-menu-by-hand): a hand-made row is where buttons get put beside it.

A writing area smaller than its room

The room’s editor sat in a column held to 48rem and 24rem tall, between a side menu and Dabir that could not be moved: on a wide screen a writer had a small box in the middle and empty space around it.

  • Let the text fill its column, to the bottom of the screen and from side to side; it grows with what is written and the column scrolls.
  • Let side panels (the menu, an agent) fold away from a button in the page’s header, remembered in the browser (Persisted), so the text can take the whole width.

A side panel that snaps away and flashes back

The studio’s side menu folded away by switching its display and the page’s margin at once: no movement, the page jumped 252px under the pointer. Its state was read after the page started, so a menu kept folded showed open for a moment on every load and then vanished; its only button was an icon with no word, and the backoffice’s menu could not fold at all.

  • Draw an app’s desktop panel with SideMenu.Panel and put SideMenu.PanelShow label="Menu" at the start of the page’s header: one panel, folding the same way in every app.
  • Fold with movement: the panel slides out to the start side as the page widens into its room, 300ms ease-out, both at once (md:ms-63 panel-closed:md:ms-0 md:transition-[margin-inline-start]); none with motion-reduce.
  • Keep the choice in the browser (src/lib/state/side-panel.svelte.ts) and set it on <html data-side-panel="closed"> before the first paint (src/app.html), so a folded panel never shows for a moment and the page has its width from the start.
  • Move the keyboard to the button that undoes it (Menu, or the panel’s own button), never leave it on something hidden; ⌘\ (Ctrl+\) folds and brings it back. pnpm divan:lint flags a hand-made panel (side-panel-by-hand).

A step back that a redirect sends elsewhere

A line’s step back (‹ the project) went to the project’s address. Once that address opened the project’s room, back from a line landed in the room instead of the project’s menu with its lines, and the lines took two presses to reach.

  • A step back to another level of the side menu switches the menu in place, as the Canon’s and the room’s do; it never relies on an address that may redirect.
  • When an address changes where it leads, press every step back that points at it.

A menu item only one sibling has

Films’ menu had Contents and the six other lines’ had none, though each has its own story order: a person on Books never found its chapters in order.

  • Siblings (the seven lines, a project’s parts) get the same menu.
  • An item that only some of them can use stays, and says what it waits for.

A view that fits everything opens too small to read

The Canon’s canvas opened by fitting every card on the screen: on a phone, or with hundreds of files, that was 5 to 9 percent, and no card could be read.

  • A view you can zoom (a canvas, a map, a big diagram) opens at its fit only while that stays readable (25 percent or more); otherwise at a readable zoom at its top corner, where the biggest group sits.
  • Show All stays one press away for the whole picture, and far out each card says only what it is and its title, in big type.

A button that keeps a long answer on one line

A question card’s answers were buttons, which keep their words on one line. With the panel open on a 1024-pixel screen, a long answer ran out of its card and pushed Send out of view, and a map’s titles were cut to “The Cli…”.

  • A button that holds a person’s choice in words wraps them: h-auto, whitespace-normal, text-start.
  • A list of titles in a narrow column wraps, and doesn’t cut them.

The chat about a thing on a page apart from it

Studio’s chat with Dabir was one room for the whole story, with a menu of its own, while each line’s page held its folders and takes with no chat. People opened Films and looked for the chat about Films there, then went back and forth between the room, the Canon and the line.

  • Put the chat about a part where that part is: a line’s page is its room, with its chat, and its files and story order beside it in the panel.
  • Keep one menu per part: the line’s menu holds its chat, the views beside it, and its work, pipeline and releases (src/routes/studio/+layout.svelte).

The same things listed twice on one page

A project’s Overview listed its seven lines as rows with their stage, each opening its pipeline, and again lower down as cards with what they held, each opening the line. People read the same list twice and couldn’t tell which way led where.

  • List each thing once on a page, with everything it needs said beside it: a line’s card says where it stands and what it holds, and opens the line.
  • What the list leaves out (a line’s pipeline) is one step in, on the thing’s own page or menu.
  • Head a page about one conversation by what it was about and when, not by its first words: its first message shows them right below (the Canon’s earlier chats did both at first).
  • A card says each thing once too: Dabir’s card for a decision showed the decision as its line under the title and again in its Decision row. A card whose rows say its summary leaves the summary out (ProposalCard.svelte, src/lib/studio/card-view.ts).

A number that starts again in each group, shown without its group

Each sequence numbers its scenes from SC010, so a flat list of a film’s scenes showed SC010 twice, for two different scenes, and people could not tell which was which.

  • In a flat list, show a unit’s code under its root (SQ020 › SC010), or group the list under its parents.
  • A code’s last part alone is enough only where its parent is already said: inside its sequence’s folder or under its heading.

Every choice laid out before anyone needs it

A new project opened with all seven lines (Films, Books, Audio, Music, Art, Games, Learn) in its menu and on its home, each one empty. When the founders tried it, this was the first confusion: where to start, and which of the seven mattered.

  • Show what is in use, starting with what the person asked for (a new story: one line), and keep the rest one step away: Add a Line, on the home and in the menu.
  • Never hide what holds work: a line with work in it stays, and putting work in a line brings it in.

A table or code block that shrinks away in a scrolling grid

A grid that scrolls in a box with a capped or set height (max-h, or min-h-0 in a sheet) sizes its rows from what fits, and a part that scrolls itself (a table’s wrapper with overflow-x-auto, a code block) may get no height at all. Studio’s card inside Claude showed a Timeline’s table as one row of two; Studio’s own proposal sheet lost a long text’s tables and code blocks entirely. min-h-min on the parts does not help: they overlap.

  • A scrolling grid gets auto-rows-max (grid-auto-rows: max-content), as Dabir’s chat list has: each row is as tall as what is in it, and the grid scrolls.
  • Or lay it out as blocks, one after another with margins (Studio’s card inside Claude, src/lib/server/studio/connector-card-app.ts).

A search field with two ways to clear it

A book’s search field in the Library was a search field, which draws its own × to clear it, and had a Clear button beside it as well: two controls for one thing, side by side.

  • A search field (type="search") clears with its own ×; give it no Clear button of its own.
  • When it is emptied, by the × or by deleting, clear what it found too.

A line break read as a space

A scene’s script is Fountain: who speaks on one line, what they say on the next (YADOLLAH (V.O.), then Mahmoud.). Markdown reads a newline inside a paragraph as a space, so the Canon’s editor, its Read view, Dabir’s chat and Studio’s card in Claude ran each speech into its speaker’s name, and the editor saved it so: one word changed anywhere in a scene put all its dialogue on one line.

  • Read a newline inside a paragraph as a line break, in every text: new Marked({ gfm: true, breaks: true }), in renderMarkdown (src/lib/studio/markdown.ts) and in the editor’s reading (editor-markdown.ts) alike. Fountain needs it, Dabir and Claude mean one by it, and nobody in Studio wraps prose by hand. pnpm divan:lint finds a Markdown reader without it.
  • Write each line break back as it was read: a newline (Shift+Enter makes one too), or a backslash where the file had one. A line that would start something else in Markdown (a heading, a list, a quote, the rule under a table’s header) keeps its first sign as a word; an empty line inside a paragraph keeps its break with a backslash, since a blank line starts a new paragraph.
  • Plain text pasted keeps its lines too: a blank line between paragraphs, each other newline a line break (plainText in editor-markdown.ts). ProseMirror’s own paste made every line a paragraph of its own.
  • Test the way back: a script read and written again, and again after a word changed elsewhere in it, comes back as it was (tests/studio-editor-markdown.test.ts). Opening a file never writes it: the editor sends its text only after a change, and the page saves only a text that differs from the one it opened.

HTML built in a .ts module, out of the lint’s sight

Studio draws every Markdown text (Dabir’s answers, a proposal’s text, its card inside Claude) with renderMarkdown, a .ts module that builds its HTML in strings. pnpm divan:lint ran the UI rules on .svelte files alone, so two broken rules went unseen there: a task list (- [x] …) showed the browser’s own checkbox, disabled for good, and every table cell took its text’s direction (dir="auto"), so a Persian value in an English table sat at the far side of its column. Looking at it in a browser showed a third: every list came out left to right, a Persian item’s bullet past the list’s right edge, in a Persian page too. The Canon editor drew the same lists from the same kind of module (ProseMirror’s toDOM, src/lib/studio/editor-schema.ts): every item and its line had dir="auto", so the item read nothing and every bullet, number and task box sat at the left of Persian items; Safari set their words at the left too (the browser’s own text-align for an <li> is match-parent, which it reads against the list), and an English table on a Persian page read its columns from the right.

  • A task in a text that reads is a state, not a control: a mark in its bullet’s place, a turquoise check when done and the neutral status dot when not yet, and the state in the page’s words for a screen reader (taskMark, src/lib/studio/task-mark.ts). Keep Checkbox for a task someone ticks.
  • dir="auto" reads no word inside an element with a dir of its own or in a <bdi>, so a list whose items each had one read nothing. A list has no direction of its own: each item takes its own and keeps its bullet in a start margin of its own (ms-6). A bullet hangs outside its item’s box, so padding on the item does not hold it; a margin does. A paragraph right inside an item has no dir, so the item reads it.
  • A table in a text is a block like a paragraph and takes its own direction: a Persian table in an English page reads from the right. Its cells keep the table’s direction and hold their words in a <bdi>, so renderMarkdown sets the table’s direction from its first letter (directionOf).
  • Where an item’s line keeps a dir of its own (the Canon editor’s schema gives every line one), give the item the direction of its first line’s words, and a table its first words’ (data-dir, src/lib/studio/line-direction.ts), and give the item text-align: start, so Safari does not align it to its list.
  • pnpm divan:lint reads every .ts module whose strings build an element with a class with the UI rules, in its strings alone (reviewHtmlModule): the code around them is blanked, so a name like border in the code is no finding. The brand book’s own sources, which quote the rules, are left out. It flags dir="auto" on a list or table whose items or cells have a direction of their own (dir-auto-reads-nothing) where the markup says so; a tag made from a variable (<${tag}>) it cannot read, so look in a browser too.
  • A page that shows this HTML without the site’s CSS (Studio’s card inside Claude, src/lib/server/studio/connector-card-app.ts) styles it by its elements and data attributes: change its styles in the same change as renderMarkdown.

A script’s own signs rewritten on save

A scene’s script is Fountain inside Markdown, and Fountain gives some of Markdown’s signs a meaning of its own: [[a note]], ~a lyric, /* words left out */, === a page break, _underlined_ words, >THE END< centred. The Canon’s editor put a backslash before every sign in words and wrote every mark with its own sign, so one word changed anywhere in a scene turned [[a note]] into \[\[a note\]\], ~a lyric into \~a lyric and _underlined_ words into *italics*, and the script no longer read as Fountain.

  • Put a backslash before a sign in words only where Markdown would read it as a sign without one: write the text without it, read it back with marked, and keep it so when it reads the same (asWritten in src/lib/studio/editor-markdown.ts). Brackets that make no link and a lone ~ stay as they are; [a](b) typed as words keeps its backslashes. pnpm divan:lint finds a writer that puts one before every sign.
  • Keep the sign each mark and quote was written with: _ or * for italics (Fountain underlines _words_), __ or ** for bold, ~ or ~~ for struck words, and > with or without a space (Fountain centres >THE END<). Read them as Markdown does, so the editor shows what the Read view shows, and write them back as they came. The editor’s own sign is for marks made in it, and for where Markdown would not read the one written (an _ inside a word). Let italics with _ and with * sit on the same words: Fountain underlines words that hold italic ones.
  • Close a mark at the end of a line when the next line opens it again, as it was written: Fountain’s bold and italics end with their line. A mark written across a line break stays across it.
  • Test a whole scene: read and written again, and again after a word changed elsewhere in it, it comes back byte for byte; random scenes too (tests/studio-editor-markdown.test.ts).

One assistant to talk to in two places

A new story had two Dabirs: the Canon page’s chat, with its own About menu and its own chats, and each line’s room. People could not tell which one to ask, the two were told different things and kept different histories, and a fix made to one never reached the other.

  • Give an assistant one place to talk: Dabir works in each line’s room and nowhere else.
  • Everywhere else, ask it from where you are: Ask Dabir on a file opens the room of its line with that file in focus (on a phone the chat stays in front, and the bar names the file).
  • Retire the other place without losing what was said there: its chats stay, to read, and a card nobody decided says so and where to ask again.

A book shown like a program listing

The Library showed a Persian book of verse, the Shahnameh, in a grey box with a number on every line, each hemistich a row of its own and its headings as “# آغاز کتاب”. Five rows of controls stood above its first line: a dot saying it was read, Read Again, the search, a sentence on how the search works, and “Lines 1–15 of 15”. Under the book, Studio’s own summary of it sat in a full editor.

  • A book reads as a page of the book: no box, a reading width, headings as headings, a number every few lines (each one on hover), larger type. Persian verse reads as beyts: two hemistichs side by side in font-verse, each column as wide as its longest hemistich (the rows on one subgrid) and the page in the middle, never justified (that spreads Persian words apart); on a narrow page, the second under the first at the far side (bookRows and looksLikeVerse in src/lib/studio/library.ts). The person switches between Couplets and Lines, kept for each book in their browser.
  • Above a text, only what the person uses now: a state only when it needs them (reading, stopped), a rare action in the file’s menu, a hint where it helps (under a search that found nothing), a count only when there is more than one page.
  • A file whose page shows something better than its text (a book’s record, the document it was read from) hides its text editor (textShown on FileEditor).

A scroll area that stretches the page

In a line’s room, the box for writing to Dabir moved up as the page scrolled, with empty space under it. The room is one screen tall and only its messages scroll, yet at 455×610 the page was 1,472px tall: a question card far down the messages held an sr-only label (“Your own answer”). sr-only is position: absolute, and a part placed that way belongs to the nearest box around it that has a position. The list of messages had none, so the label belonged to the page: the list neither cut it off nor scrolled it, and the page stretched down to where it sat. A sheet’s scrolling body stretches its sheet the same way (its title scrolls out of sight), and a table that scrolls sideways makes the whole page scroll sideways.

  • Make every element that scrolls relative: relative min-h-0 flex-1 overflow-y-auto, relative overflow-x-auto. One that scrolls only from some width has its position at that width too (lg:relative lg:overflow-y-auto). What is placed inside it (an sr-only label, a badge, a dot) then stays inside: it scrolls with the rest and adds to its own scroll, never the page’s. pnpm divan:lint catches a scroll area with no position (scroll-area-unpositioned); a <pre> holds only text and needs none.
  • A page that fits the screen and still scrolls: compare document.scrollingElement.scrollHeight with innerHeight, and look at the absolutely placed element that lies lowest. That one got out.

A view that takes the wheel inside a page that scrolls

The 3D set’s viewer zoomed on the mouse wheel and kept the wheel from the page. It is nearly as tall as the screen, so a person scrolling down the 3D set’s page with the pointer over it zoomed the set out instead, and the page did not move.

  • Inside a page that scrolls, leave the wheel alone to the page: zoom on a pinch (a trackpad sends it as a wheel with Ctrl) and on Ctrl or ⌘ with the wheel, and say so in the view’s hint (onWheel in src/routes/studio/GlbViewer.svelte).
  • Only a view that is the whole page below its title (the Canon’s canvas) takes the wheel for itself.
  • Scroll the page with the pointer over the view: the page moves.

Something used from every page, in one level of the menu

Generations (quick work outside every project) was a row of the studio’s own menu. Inside a project the menu shows the project’s level or a line’s, so reaching it took two or three steps back, though the founders used it from everywhere.

  • Put what people reach for from any page in the page’s header, not in one level of the side menu: Quick generations is a ghost link-button with its icon at the end of the header’s row, before the language and the account (never copper: the page keeps its one filled button), lifted on its own page (aria-current, as the site’s header lifts its links).
  • On a phone it is an icon button in the glass bar, its name its aria-label; where the bar has no room for the page’s name as well, the name gives way (the breadcrumbs under the bar say it).
  • The side menu keeps where the work is: the app’s home first, then its collections.

A line-clamp that takes a part’s flex with it

On Dabir’s explained cards the Recommended badge touched the end of its answer. Item.Title had been given line-clamp-none, so a long answer would wrap. cn() (tailwind-merge) counts line-clamp-* as a display class, so it dropped the title’s own flex too: the title became a block, and its gap-2 did nothing.

  • Never pass line-clamp-* to a Divan part whose own classes say flex, grid or inline-flex (Item.Title, Button, Badge, Card and most others). Item.Title already wraps, as it is flex. To cut text short, clamp an element of your own inside the part, such as a span with line-clamp-2.
  • A Description (Item.Description, Sheet.Description) sets no display of its own and may take one: line-clamp-none shows a whole meaning. pnpm divan:lint finds the rest (clamp-drops-flex).

Words in the chat that cannot be selected

Each of Dabir’s explained answers was one button, the answer and the line under it together, and file names in the chat were links. Neither started a selection: Button is select-none, and Chrome starts none on a link unless it is select-text, so a drag that started on them pressed the answer, dragged the link away or did nothing, and none of those words could be selected and copied. Keeping the links from being dragged was not enough: on the live site they still selected nothing until they were select-text too. Then a drag within a file’s name still opened it in the panel: the room’s own link handler hears every click first, before keepLinkSelections, and opened it. On Dabir’s forms the answers he proposes were Buttons and the question over each field a Label, both select-none: a drag across “(e.g. ‘about 50, round, kind eyes, grey beard’)” selected nothing and put the cursor in the field, so the founders typed the example again (2026-11-28). And a drag inside a button that starts in the middle of its first letter selects nothing in Chrome: its click still answered, and so would a press held by the early-press script in app.html before the page’s code had started.

  • Give a row that holds words a person may copy role="button" on an element that is not a button, with pressOf (src/lib/pressable.ts): Enter and Space press it, and a click that ends a selection inside it is a selection, not a press.
  • Make the chat’s links select-text and keep them from being dragged ([&_a]:select-text [&_a]:[-webkit-user-drag:none] on the room), so a drag across a file’s name selects it. keepLinkSelections (src/lib/pressable.ts) on the room keeps a click that ends a selection inside a link from opening it; a press, or Enter, still opens it. pnpm divan:lint flags user-drag without select-text (link-drag-without-select). A short control label (Accept, an expert’s name) stays a Button.
  • A handler of the page’s own that opens links and hears every click first (the room’s, in the capture phase) asks linkSelectedBy(event) (src/lib/pressable.ts) before it opens one, and opens nothing when it gives a link; pnpm divan:lint flags one that does not (link-click-ignores-selection). Check with a real drag on the real page: a test page without the page’s own handlers missed this.
  • Give a Button whose words a person may copy (an answer Dabir proposes) select-text and onclick={unlessSelecting(…)} (src/lib/pressable.ts): Chrome then selects its words, and the click that ends the drag picks nothing, even when the drag selected nothing: pressOf, unlessSelecting and linkSelectedBy take a click whose pointer moved more than 5 px since it went down for no press, and the early-press script in app.html holds none. Enter and Space still press it. In the chat, give each Label and Field.Label select-text: after a drag across it Chrome leaves its field alone, and a click still puts the cursor there. pnpm divan:lint flags both (button-select-presses, chat-label-unselectable).
  • Studio’s card inside Claude is a page of its own that the lint does not read (src/lib/server/studio/connector-card-app.ts): its answers are user-select: text, so its btn() asks the same pressed() before it presses (where the pointer went down, a selection inside the button). Found on 29 November 2026, beside the room’s card: a drag across one of its answers would have picked it.

One form in two looks

The Make card in the chat labelled its fields with Field.Label (“Model”, “Shape”) and its segmented choices with faint footnotes (“How many”, “Size”, “Quality”), so the choices read as notes beside the form, not part of it; the share sheet, the upload sheet, a take’s viewer and the company’s invite did the same (2026-11-28).

  • Label every control of a form alike: a field with Field.Label, a segmented choice with a line in Field.Label’s look (text-subheadline font-medium text-foreground) whose id the group names in aria-labelledby. The lint rule group-label-unlike-fields finds a choice labelled smaller.
  • Keep footnotes for what is said under a control (a hint, what a choice means), never for its name.

Pictures and frames

A picture spills out of its frame

A logo or photo in a fixed-height frame with max-h-full renders at its full width-based height: a percentage height does not resolve inside an auto-height grid or flex item, so tall pictures (the Persian wordmark, a mark, an app icon) run over the text under the frame.

  • The frame gets a definite height and overflow-hidden; the picture is size-full object-contain.
  • Check every card with its tallest and its widest picture, at 375px and on desktop.
  • pnpm divan:lint flags max-h-full on an image.

A row of buttons that breaks in two

Three buttons with long labels fit a wide card but not the narrow one next to it: the last one drops to its own line and the cards stop lining up.

  • Keep labels short in repeated cards (“Copy”, not “Copy SVG”) and put the longer meaning in title.
  • Size the row for the narrowest card it appears in, in both languages.

A sample on its own colour

An asset shown on the same tone as its own edge disappears: the app icon’s ink tile on brand ink, a strip of samples on the page tone with nothing to hold it.

  • Page-tone examples sit in a card-tone frame (Example surface="page" does it); glass needs something behind it to show.
  • Show a sample on a surface one step away from its own colour (bg-popover under ink-tiled icons, porcelain under on-light files).
  • Every group of samples sits on a card, so it reads as one group.

An SVG drawing of numbers mirrored in Persian

The flow ribbons were laid out in a mirror on Persian pages (the first column on the right) while every other chart reads left to right; in SVG, text-anchor start/end follow the text’s direction and a tspan dx pushes a count the wrong way.

  • A drawing of numbers reads left to right in both languages, like every chart: lay it out once, set direction="ltr" on the SVG, and keep only its words in the page’s language, isolated.
  • Space a count from its name with a character, not dx; the row of controls that chooses the columns follows the drawing’s order (dir="ltr").

A history drawn in full

Daily stories drew every story it had, up to 60 rounds-and-days, each as a 1080×1920 canvas, the moment the page opened: a phone ran out of memory for pictures nobody was looking at, and today’s story was hard to find among them.

  • Draw the newest day on the page; list earlier days in a DataTable and draw one only when it is opened (in a Sheet).
  • A tall 9:16 preview sits beside its details at a fixed width (15rem), never across half the page.
  • Below the first screen, images, canvases and charts appear only when they are needed.

A chart type the bundle does not have

The Plotly bundle in use (plotly.js-basic) has no Sankey, and pulling in the full bundle or d3 for one diagram adds hundreds of kilobytes.

  • Draw flows as SVG in a small component (components/backoffice/Ribbons.svelte): filled bands, colours from var(--color-*), no outlines, labels in the side rooms.
  • Group the long tail into “Other …” so every page and every event still counts but the picture stays readable; keep the layout in a pure, tested file (src/lib/live-flow.ts).
  • On a phone keep the picture’s width and let its card scroll sideways, with the scrollbar hidden.

A frame kept for a picture that never came

A studio card holds each video’s frame (9:16, 16:9) while it is being made. When the video did not finish, the card kept that frame: on a phone its reason and Try Again sat at the bottom of a screen-tall empty box.

  • Hold a picture’s frame (aspect-ratio) only while it is coming or there: a Skeleton while it loads, the picture once it is ready.
  • When it will not come (failed, expired, removed), drop the frame: a short tile (min-h-32) with the reason and the way forward.

A name on a small picture cut short

The composer tagged each reference with its name in a glass pill laid over the 64px picture. The pill had 56px and “@image1” needs 61, so it read “@ima…”, and @image10 could never fit.

  • Put a picture’s name under it, as wide as the picture, where the whole name fits. Lay text over a picture only when it is short and always the same (a status, a play mark).
  • Check each name on a picture at its longest, in both languages: scripts/ui-audit.js lists anything cut off.

Full-size pictures in small tiles

The studio’s grid, project covers, library, element pictures and the composer’s strips each loaded the original picture, often 1–3 MB, into a tile a couple of hundred pixels wide; video tiles loaded whole videos, from a route that could not answer a range. Slow everywhere, and from Iran they never arrived.

  • A studio picture in a tile, cover, strip or the composer is its thumbnail: src={thumbUrl(x.url)} (#lib/studio/media.js) asks the media route for a WebP at most 480 px wide and 60 KB, made once with the Images binding and kept in R2. The studio-full-size-picture lint rule catches an <img> that skips it.
  • Only the viewer shows the original, with its thumbnail under it until the original arrives, so a picture that stalls still shows.
  • Media routes answer Range requests (a video starts and seeks without the whole file, and Safari plays it), and a video tile shows a poster when there is a start frame.

A picture that looks sent but is left out

In the studio a video could have a start frame and references at once. OpenRouter goes by the frames and drops the references, yet the tray still showed them as @image1 and @image2, as if the model would see them.

  • When a later choice means a picture will not be sent, show it faded and say why next to it (“With a start frame, the model goes by the frames and leaves the other references out”).
  • The server sends exactly what the page shows as sent: here, no references go with a start frame.
  • Read the service’s own rule for what wins when two inputs meet, and follow it on the page.

A card that keeps room for a picture it does not have

A new story’s Overview drew its Story card with a 16:9 cover slot holding only an icon, and All projects did the same for a project with no shots: on a phone the empty slot filled the screen and pushed the canon and the lines out of sight.

  • Give a card its picture slot only when there is a picture to put in it; until then the card is its title row (icon, name, count).
  • Open a new, empty project on a 360px phone: what comes first is its name and what to do, not empty frames.

A network shown with another network’s icon

PlatformBadge chose its icon with yt ? 'youtube' : 'instagram', from the days of two networks. When Telegram arrived, every Telegram card on the Board, and every Telegram account on People, carried the Instagram logo next to the word Telegram.

  • Name the icon of every network the badge can show (instagram, youtube, telegram), or pass the platform itself; never pick between two.
  • When a network is added, open each page that labels networks with a row from it.
  • pnpm divan:lint flags an icon name chosen between two networks.

A document chosen as a cover

A studio project’s cover, and each line’s on its Overview, was its newest finished asset that was not a sound. Once lines took PDFs, EPUBs, Word files and ZIP builds, a story whose newest asset was a script put the PDF’s link in an <img>: a broken picture on Projects and on the Overview.

  • A cover, a poster or a tile’s picture comes only from a picture or a video: whenever a list of assets picks one to show, check what each file is (isAudioKey, isDocumentKey in #lib/server/studio/media.ts) and skip the rest.
  • When a new kind of file can join a list, open every page that picks a picture from that list with one of the new kind newest.

A player that stays black at 0:00

Every video and sound in Studio stopped playing at once: the server answered each part of a file a player asked for with content-range: bytes NaN-NaN/… (R2 had handed back a range with an empty suffix key, and 'suffix' in range took it for a “last n bytes” read). Browsers throw such an answer away, and the players had no onerror, so they sat black at 0:00 with nothing on the page; the only sign was “Format error” in the console.

  • Show every video and sound through MediaPlayer, and every video tile through VideoFrame (#lib/components/ui/media): a file that does not play says so in place, with Try Again and Download, and a tile falls back to its poster or a film icon. pnpm divan:lint flags a <video> or <audio> with no onerror.
  • A route that answers a Range request writes Content-Range with servedRange and contentRange (src/lib/server/http-range.ts), from real numbers only; when the part cannot be told, it sends the whole file.
  • When a player stays black, read the answer, not the file: fetch its address with a Range header and cache: 'no-store', and look at the status and Content-Range (an answer from the browser’s cache hides the server’s).

A voice drawn as a broken picture

A lip-synced take (a picture made to speak a voice line, src/lib/server/studio/lipsync.ts) keeps the picture and the voice’s WAV as its references. The Viewer drew every reference as an <img>, so the voice showed the browser’s broken-picture sign; Sound said Off, though the video speaks; and Recreate put the WAV in the composer as a picture, with a model the composer cannot use. Across the platform, 33 more <img> tags had no fallback either: Studio’s tiles, the backoffice’s Instagram and YouTube thumbnails (whose links expire), and people’s photos.

  • Draw a stored file as what it is: check isAudioKey and isVideoKey (#lib/server/studio/media.ts), and show a sound with MediaPlayer kind="audio" and a video with VideoFrame, never an <img>.
  • Show every picture that comes from a file or another site through Picture (#lib/components/ui/media): when it does not load, the same box shows a quiet icon on the muted tone (a person for a profile photo). pnpm divan:lint flags an <img src={…}> with no onerror.
  • Offer a remake only where it can be made: Recreate, Try Again, Keep Seed and New Version go through the composer, so they show only for its models (inComposer in #lib/studio/catalog.ts); a lip-synced take is made again in the Room.

A shot’s first frame read as all of it

A picture made for a shot that becomes a video is its first frame, and nothing told the prompt writer so: it described the whole shot, and the picture for Haft Rang’s SH0040 showed the bird already flown from its tile, where the video had to begin with it still painted there. The continuity check, run when that picture was used, then filled the shot’s How it ends from it, and the video used after could not change it: the next shot would read how this one starts as how it ends.

  • Tell the prompt writer a picture is a shot’s first frame when the shot is made as video (it names a video model or a length: madeAsVideo in src/lib/studio/shot-note.ts): it shows the moment the shot begins on, before what happens in it.
  • Fill How it ends from a video’s last frame, and from a picture only on a shot that is not made as video (endsFromTake in src/lib/studio/continuity.ts).
  • Let a later take’s ending take the place of what Studio filled from an earlier take, never of what a person wrote (labelGivesWay in src/lib/server/studio/canon-edit.ts), and know Studio’s own by the words it wrote, kept on the take’s record (continuity.filled): a model checking the same take again says it in other words.

Every project behind the same folder icon

Projects and the side menu showed each project with no cover as a folder: a list of films, books and lessons looked alike, and nothing said what each one makes.

  • Until it has a cover picture, show what it makes: the icon of its first line in use (PLACE_ICON from #lib/studio/icons.js; Films, where every story starts, when it has none), in the table and the side menu alike.
  • Take it from what the page already reads (the Projects page’s summaries carry each project’s lines): the studio’s frame, read on every page, asks the database nothing more for it.

Pictures to choose from, cut by their frame

The chat’s first card of takes drew each picture in a square with object-cover: a wide character sheet lost the figures at its ends, so the person could not judge the take they were choosing (2026-11-28). The take grid had it right: each of its tiles takes its take’s own shape.

  • Show a picture someone chooses from whole: in its own shape (aspect-ratio from the take, as GenerationGrid does), or object-contain in a fixed frame on bg-muted. Keep object-cover for a picture that only decorates (a cover, a person’s photo).
  • Before shipping, look at it with a wide sheet and a tall picture: neither is cut at its edges.

A take of several pictures shown as one

One Make of 4 pictures is one take holding all 4 (its first as resource, the rest as resources); the chat’s show_media read only the first, so Dabir told the founders the 4 options were 1 picture (2026-11-28).

  • Show every picture a take holds: its resource and each of its resources, one tile each (src/lib/server/studio/dabir.ts tileOf).

Options to choose from, opened alone in a new tab

The chat’s Make card linked each picture it made to its original file in a new tab (2026-11-28): one picture at a time, away from the chat and from the choice, with nothing to compare it to; on a phone the chat was gone. The founders asked for “advance image viewer and selection”.

  • Open an option someone chooses from in the studio’s own viewer, beside where it is chosen: in the chat, OptionsViewer.svelte (large, zoom, previous and next, two to four side by side with one zoom, what each was made with, Use This One beside it).
  • Keep every round of a card on it, newest first, so what was made before can be compared and chosen too.
  • pnpm divan:lint flags a stored file’s link opened in a new tab in the studio (option-in-new-tab).

A view made for one kind of thing, showing another

The 3D viewer was made for a place’s 3D set: it looks at a point a third of the way up from the floor, from at least two metres off, and says “The 3D set did not load”. A 3D model made from a picture, shown in it as it was, filled the box and was cut off at the bottom, and one that did not load was called a set.

  • When a view takes a new kind of thing, tell it the kind (what="model" on src/routes/studio/GlbViewer.svelte) and let the kind choose its framing and its words.
  • Frame a thing by its own size: a model whole in the box with room round it (its reach × 1.5), a set from inside its walls.
  • Open one of each kind in the view before shipping: each is whole, and every word names what is shown.

A button that works on the first picture, not the one shown

A take can hold several pictures: a press of two, or a picture split into layers (its base, then each layer). The viewer’s 3D Model and Split into Layers sent only the take’s id, and the server took its first picture: on a split poster, with its bird layer shown, 3D Model made a model of the background, at $0.40 to $1.40 a press. Every other button there (Animate, Use as reference, Download) already used the picture shown.

  • Send which picture is shown with the take’s id, and make from that one on the server; refuse a place the take has no picture at (pictureOf in src/lib/server/studio/generate.ts, output: shownAt in src/routes/studio/Viewer.svelte).
  • A new button beside others works on what they work on: read how its neighbours pick the picture before writing its own.
  • Open a take of several pictures, show the second, and press each button: what it makes comes from the second.

State and loading

A saved preference read too early

Reading localStorage while the page starts makes the first render differ from the server’s HTML, and the browser keeps the server’s words: the toggle says Persian, the page stays English.

  • Start at the default and read storage after the page hydrates: Persisted.connect() in onMount.

Two address changes in a row

replaceState is asynchronous, so a second change built on location.href while the first is on its way puts the old value back: pick a filter, then a sort, and the filter is gone.

  • Keep view state in UrlState: every change goes through one queue that builds on the address already asked for.

An action that succeeds without saying so

A reply is posted, the sheet closes, and nothing says it worked: the person cannot tell it from a reply that was lost, and presses Reply again.

  • Every action that closes its sheet or form leaves a Note next to the list, in a role="status" region, naming what happened and to whom (“Reply posted to @name”). Toasts only where a <Toaster /> is mounted: the backoffice layout has none, so use a Note.
  • Read the action’s result (form?.replied) and show it; a result nobody displays is the same as no result.

An answer shown under the wrong form

On Reply settings any failure without a platform appeared under both Reply timing and the queue; on Connections every answer showed at the top of the page, far from the form it was about. The generator’s help with the prompt did it too: “The prompt came back the same”, the answer to a change asked in its chat, showed above the prompt, a screen away from the chat box on a phone.

  • Every answer from an action names its form (action: 'post'), and each form shows only its own, right next to it.
  • A panel with several asks keeps an answer for each and shows it beside the ask it answers: Write with AI and Show the Prompt under their buttons, a change by chat under the chat box (src/routes/studio/PromptHelp.svelte).

A live refresh that overwrites what someone types

Under live updates the page re-reads its data whenever a table changes: fields filled from data on every load (Edit List) were rewritten while someone typed, and a streamed part flashed back to its Skeleton (and lost an attached file) on every refresh.

  • Fill an edit form once, when it opens, never from every load.
  • Keep the last answer of a streamed part on screen while the next one comes; show the Skeleton only the first time or when the filters change.

A field inside {#await} that vanishes from its form

A switch drawn only after a slow check answered was missing from the form until then: saving before the answer quietly turned the requirement off.

  • Keep every field of a form in the form from the start; only what depends on the answer (turning it on) waits for it.

A slow outside call in a layout that every page waits for

The Episode names layout asked Google whether sign-in was set up (up to 5 seconds on a cache miss), so all six pages under it waited for an answer only Settings shows.

  • A layout loads only what every page under it needs; a slow check moves to the one page that shows it, as a streamed promise.

A filter applied after the limit

Activity fetched the newest 200 events and then kept only the chosen kind, so “Posts” showed nothing while older posts existed.

  • Filter in the query, then limit; filter in code only as a second check.

A note that stays after it is done

On Insights prompts, “Save first, then read again” compared the fields with the values the page first loaded, so it stayed after saving.

  • Compare with the last saved values, and clear the note when what it asks for is done.
  • A page’s lead says only what is true now, too: Studio’s page for a card from a person’s own Claude still said “Nothing changes until you accept it” after the card was accepted. Words that wait on a yes show only while the card waits.

A press that throws the view away

Insights kept the chosen post and the days in the address (?scope=…&days=14). Pressing Analyse Now posted the form to “?/run”, and SvelteKit lands an enhanced form on the address it posted to, minus the action: the page came back on Everything and 30 days. Every backoffice form did the same to its page’s filters, sort and table page.

  • Post to actionUrl('name') from src/lib/action-url.ts (action={actionUrl('save')}, formaction={actionUrl('status')}): it keeps the query and adds the action.
  • pnpm divan:lint flags a bare "?/name" in a backoffice page (form-action-drops-view).
  • Press every button on a page with a filter, a range or a chosen row set, and check the address and the view are as they were.

Filters the server reads, kept with a shallow address change

UrlState writes the address with a shallow replaceState: no load function runs. A filter that changes what the server reads (a date range, a source, a country) then updates the address but not the numbers, and only a reload shows them.

  • Filters that the server reads go through goto(url, { replace: true, reset: false }), built from the current address with only the filter keys swapped, so other keys (a tab, a table sort) stay. The server cleans what it reads and falls back to the default, and the page shows the cleaned filters it gets back.
  • Keep UrlState for what only the browser draws: the chosen tab, a table’s sort and search.
  • Only what differs from the default goes in the address, so a clean view has a clean address; show every active filter as a removable chip with one Reset.

A background refresh without a catch

A poll or a Realtime refresh that awaits invalidateAll() with no catch turns every lost connection (a phone in a tunnel, a sleeping tab, a deploy in between) into an unhandled rejection. Error tracking counts each one as a browser error: ~100 a day on the support page, which buries the real bugs.

  • Every refresh that nobody asked for is try/catch (or .catch(() => {})); the next poll or change tries again, nothing is shown.
  • After a deploy the old page asks for scripts that are gone: handle vite:preloadError by reloading once (not again within a minute).
  • In the Live page’s “What goes wrong”, read the What column before deciding something is a real bug.

A button that can fail without a sound

An app link (intent:// or youtube://) that the in-app browser refuses does nothing at all: no error, no page change. People tap again and again, which shows as rage clicks, and the one button the whole invite depends on looks dead.

  • The first tap says what is happening (“Opening…”, a Spinner inside the button) and further taps are ignored while it does.
  • If the page is still in front a moment later, say so in a Note and make the web button the one filled button; count that miss so it is visible.
  • Keep a plain web link beside it: it works with no script and no app.

A filtered table that stays on a page that is gone

A table with pages stays on page 7 when a filter above it leaves two pages: it shows no rows, and the filter looks broken.

  • A table whose filters live outside it (a bar, a Sheet) gets pageKey={view}: it goes back to page 1 whenever that value changes. The sort and the page stay in the address (urlKey).
  • Check it: go to page 2, apply a filter, and the table shows its first page.

A filter that cannot be switched off

A “minimum comments” that starts at 1 and cannot go lower hides everyone with none: people blocked before they ever commented never showed on the Users page, and nothing said so.

  • A filter’s default shows everything and its lowest value matches the lowest the data has (comments from 0).
  • Say what a filter leaves out when it is not obvious (“People blocked before they ever commented have none”).

A file from another site that fails without a word

Photos and clips in a conversation are links to Instagram’s servers. They stop working after a while, and some refuse a page that says where it came from. Drawn as a plain <img> they leave a broken icon or an empty gap, and nobody can tell why.

  • Ask for them without a referrer (referrerpolicy="no-referrer"), decoded off the main thread and lazily.
  • When one does not load, say so in a quiet tile beside the message with Try Again (ask for fresh links) and Open Original. Never a broken icon.
  • Draw by type and by file name: Instagram also sends shared posts, story mentions and reels. Anything that is not a file is a link.

Setup text that copies an old schema

A one-time setup box with SQL to paste drifts from the real table: the Blocklist box still made a table keyed by username alone, so after pasting it every block on YouTube failed.

  • Keep the setup text in step with the migrations (platform and username as the key); change both in the same commit.
  • Prefer pointing to the migration files; when SQL is shown, put it in a CopyButton so it is copied whole.

A share of the rows shown, not of everyone

A top-45 list that shows each row as a share of the 45 added together reads as a share of all followers, but is not: the cities listed hold 90% of followers, and one default city made the ranking look wrong.

  • Divide by the whole (all followers), say so in the heading (“Share is the part of all followers”), and show what is left out (“Cities listed: 90% of followers”).
  • When one row holds most of the whole and several times the next, say so beside the list in a Note and let a person leave it out; never drop it silently.

“Nothing yet” for a read that failed

A read that failed and is caught without a word looks the same as a read that came back empty: the YouTube audience showed “Nothing to show yet” in every card for as long as YouTube’s daily analytics limit was used up, so nobody knew the numbers existed.

  • Never catch a failure into an empty list. When every part failed, throw the reason; when only some did, show the rest and say which is missing.
  • Say why and when it comes back (“YouTube’s daily limit on analytics is used up … it comes back at 11:30”), with a Check again button; reserve “Nothing to show yet” for data that is really empty.
  • A used-up daily quota is not a short rate limit: do not wait and retry inside the request.

A disabled button with no reason

A Publish button that stays grey while a video is missing, the title is empty or a time has passed leaves a person pressing it and guessing what is wrong.

  • Work out what stands in the way as people type (a pure function, tested, the server checks the same limits) and write the first one in plain words beside the button: “Add the video file.”, “Say whether the video is made for kids.”.
  • Each says what to do, never blames; the button enables itself the moment the list is empty.
  • Answers the law needs (made for kids) start unanswered, so the person chooses; never a default of “No”.

An unsent draft lost to a reload

A long caption or description typed into a composer is gone after a reload, a closed tab or a crash, and has to be written again.

  • Keep what is being written in this browser with Persisted (the title, the description, the caption, the type) and read it back in onMount, so the first render still matches the server; clear it when the post is sent.
  • Never keep the choice that sends something (Publish now) as a preference.

A signed-out visitor sent to an error page

The studio’s layout shows the sign-in form to someone signed out, but each page’s data asks for an admin first. Without an error page of its own, the refusal rendered the site’s “401 · That didn’t go through” instead of the form.

  • Every section behind a sign-in (backoffice, studio) has its own +error.svelte next to its +layout.svelte, so a refusal renders inside the layout and the layout shows the form.
  • A test fails when a layout with the sign-in form has no error page beside it.

A field that shows after a press and does not take the typing

A folder’s New Folder button shows a name field with autofocus. Svelte moves focus to an autofocus field only when nothing has focus, and the button just pressed has it: the typing went nowhere, and Enter pressed the button again and hid the field. The studio’s Add Palette did worse: the button goes away as the form shows, so focus fell to the page.

  • Move focus from code: bind:ref={field} on the field, then $effect(() => { if (open) field?.focus(); }), or select() to replace a name that is there.
  • Let Escape close a field that a press opened.
  • pnpm divan:lint flags autofocus (autofocus).

A picture the prompt cannot name

The studio’s @ list found only elements. A picture attached to the prompt, or uploaded earlier, could not be mentioned: “the woman in this picture” had no way to say which picture, and the model got the pictures without being told what each one was for.

  • Give everything that can be attached a name the text can use, and show the name on it: the composer tags its references @image1, @image2 … in the tray, and the model reads them as “reference image 1, 2 …”.
  • Offer it where the person is already typing: @ lists the pictures in this prompt, the elements and the recent uploads, and picking an upload attaches it.
  • Keep numbered names true: when a picture leaves the tray or moves, the mentions in the text follow it, and the mention of one that left goes with it.

An instruction in a tooltip on every row

Every folder in the studio’s side menu and on a project page had title="Drop on Characters to move there". The browser showed it after a moment on every folder the pointer passed, screen readers read it after each folder’s name, and a phone never shows it.

  • Show what a drag does while it happens: the folder under the pointer turns bg-primary/16.
  • A title or Tooltip names an icon button. An instruction people need goes once on the page (an empty folder’s text, a Note), never on each row.
  • The same goes for one sentence printed on every card: Connections said “making with it in the studio comes in the next step” on six of them. Say it once on the page, naming the cards it is about.

Big files stall in Iran

From Iran, a file from our site bigger than about 64 KB often stalls and never arrives (about 80 KB on most networks; on one, a 71 KB file stalled every time while 62 KB came through). In November 2026, from eight servers inside Iran, the 13 KB page and files up to 60 KB came in under a second, while the 106 KB Amiri font and the 110 KB PostHog script still had not arrived after 25 seconds on five of them; the same font from another CDN came through at once. Visitors there get the page without whatever stalled (the font, the hero picture), and PostHog, itself a big file, never loads for them, so its numbers for Iran look fine.

  • Keep every file a page loads under 60 KB as sent (compressed), in the backoffice and studio too (the team uses them from Iran): cut fonts down to the letters they draw (src/lib/fonts/amiri-persian.css), encode each picture for the size it is shown at, split big code, and load a big library such as Plotly from jsDelivr with its integrity hash, falling back to our own copy (src/lib/charts/load-plotly.ts).
  • Load what the page does not need to appear (PostHog, its replay and surveys) after the load event, when the browser is idle.
  • A library can fetch more files later, which the build never sees: PostHog’s session recorder is 68 KB, so visitors in Iran’s time zone get it from jsDelivr, pinned by its hash (src/lib/posthog-cdn.ts). Keep the Network panel open after the page has loaded, too.
  • Check from Iran, not from PostHog: check-host.net has servers there (check-http with node=ir1.node.check-host.net to ir8). tests/file-sizes.test.ts fails on a file in static/ or src/lib/fonts over the limit, and the build fails on a script or style sheet over it (scripts/file-size-limit.ts).
  • Test any second host from Iran before moving files to it: in November 2026 *.pages.dev and *.workers.dev did not even connect from there, while jsDelivr, unpkg and Bunny loaded a 400 KB file in under a second on all eight servers.

A page that sends everything at once

The backoffice Comments page put all 3,000 comments into the page it sent: 185 KB of HTML and 208 KB of data, compressed. It drew only 40 cards at a time, but the browser still had to receive every row first, so it was slow everywhere and never arrived for the team in Iran, where a response over about 64 KB from our addresses stalls. People did the same with all 1,052 people: 546 KB, 98 KB compressed, on every click.

  • Send the newest few hundred rows with the page and fetch the rest in the background, in pieces under 60 KB (src/lib/server/comments-read.ts and comments.remote.ts; src/lib/server/people-read.ts and people.remote.ts), by date and id rather than by position.
  • Send each row with only the fields the list shows, and work out the rest (a status, a count) on the server: leaving out what the People list never showed made each row a third lighter.
  • Keep filtering and grouping in the browser over what has arrived, and say quietly that older rows are still coming.
  • When the page’s data reloads (a live change, an action), start again from the fresh newest rows and keep the older ones on screen until their fresh copy arrives.

A big list in a shared file

Every brand book page that took a few words from content.ts downloaded 74 KB of it, because the pitfalls list (57 KB) lived there too; and the list in a file of its own was still 62 KB, more than one network in Iran lets through. The parts of a module that any page uses are built into one file, and every page that imports from that module downloads the whole file, used or not.

  • Give a big list that one page shows files of its own and load them in that page’s load function, one download each: the pitfalls are a file per group in src/lib/brand/pitfalls/, which the pitfalls page loads through pitfalls-load.ts, and only the server imports the whole list (pitfalls.ts).
  • Do not re-export such a list from a file many pages import: the build then puts the pieces back together into one shared file (73 KB for the pitfalls).
  • When the build fails on a file over 60 KB, read the modules it names: the big one is usually a list or a library only one page needs.

A step that counts more people than the step before it

The YouTube invite page put “Invited” (the messages Ravi sent) next to “Opened divanworks.com/yt”, which also counted everyone who reached /yt from the site’s own YouTube links, and the server credited those to the invite too. The second step was bigger than the first, and the share between them meant nothing.

  • Numbers shown as steps of one path count the same people: each step is a part of the one before it.
  • Give each message, post or story its own tagged link (Live page, Tagged link) and count it by that tag, never by the page it lands on, which other links reach too.
  • Say under the numbers what they count and what they leave out.

A setting the service drops without a word

OpenRouter lists extras for each video model (a negative prompt for Kling, Wan and Veo), but forwards them only under the slug of the provider that serves the request, and documents that slug only for some. A “Leave out” field for every model that names one would have looked like it worked while the words went nowhere.

  • Offer a setting only where the service’s catalog lists it and a documented route carries it (src/lib/studio/catalog.ts: PASSTHROUGH_ROUTES); add a model to the route only once a real request shows it arrives.
  • Shape the settings from the catalog, not from a list typed by hand, and move a saved choice to the nearest one the model takes (fitSettings), so nothing is sent that the model turns away.
  • Keep what was really sent on the result (the seed a take was made with), so people can see it and use it again.

A field that eats the space just typed

The “Leave out” box first showed the cleaned-up setting, trimmed of spaces. Each key press saved, the page showed the trimmed value back, and the space after “text,” disappeared before the next word could follow it.

  • Bind a field to what the person typed (the saved preference as it is), and clean it where it is used: on the server, or when it is sent.
  • A value worked out from the input (trimmed, capped, moved to the nearest allowed) is for showing elsewhere, never for the field being typed in.
  • Type a word, a comma and a space into every field you add, and check the space stays.

A sign-in button that ends on a 500 page

Sign In with OpenRouter in the studio and the backoffice, and Connect an account in the backoffice’s Connections (Zernio), answered with a bare “500 Internal Error”. SvelteKit 3 refuses redirect() to another site unless the call says it may, and the type check, the tests and the build all passed: only pressing the button on the live site showed it.

  • Pass the sites a redirect may go to: redirect(303, url, { external: ['https://openrouter.ai'] }), or { external: true } for an address another service hands back (Zernio’s sign-in for each network).
  • tests/redirects.test.ts fails on a redirect whose address is not written as a path on this site and does not say external.
  • Press every button that leaves for another site on the live site after a deploy, and see the other site open.

A remembered choice that shows the default first

The studio’s composer keeps the chosen kind (image, video, sound) in this browser’s storage, which only the page can read, after it has loaded. The server drew Video, the default, and a moment later the composer jumped to Image beside an image model: on every page, every time.

  • Keep a choice the server draws in a cookie as well, and draw the page with it: the composer’s kind is in divan-studio-kind, read by the studio’s layout.
  • Until the stored value is read (Persisted.connected), show what the server drew, so the first paint and the next one agree.
  • Reload each page that remembers a choice, with the choice that is not the default: the first paint already shows it.
  • The brand book did the same with its language: a Persian reader got the English page first. Its language is in the divan-example-lang cookie now, read by src/routes/brand/+layout.server.ts.

A sign-in that offers a way in the reader cannot use

The studio’s sign-in, opened to everyone, still showed the backoffice password under Continue with Google: a newcomer typed their address and a password they never had, and was told the two don’t match.

  • Show only the ways in that work for whoever reads the page: on the studio, Continue with Google alone (it signs up and signs in alike); the password stays on the backoffice.
  • When a place opens to more people, read its sign-in again as one of them.

The browser’s own popup in place of the page’s guidance

The studio’s Invite People form had type="email": pressing Send with “reza” showed the browser’s popup, in the browser’s language (“Please include an ‘@’…”), and the page’s own guidance under the field never appeared, also on a Persian page. Nineteen more forms did the same: in the backoffice (its sign-in, the board’s lists, donations, settings, the composers) and on an account’s Socials page.

  • Give the form novalidate and check it on submit with FormGuide (#lib/form-guidance.svelte.js): it reads each field’s own required, type, min and max, and shows Field.Error under each one to fix, in the page’s language and its digits (“Write a whole number from 1 to 365.”).
  • Keep type="email", type="number" and inputmode for the right keyboard, and required, min and max for FormGuide to read; a field it should word its own way gets the page’s sentence (“Give the list a title.”).
  • pnpm divan:lint flags a <form> without novalidate whose fields the browser would check (form-needs-novalidate).

A form that empties itself while you type

In Studio models, the key typed into Higgsfield’s sheet vanished before it could be saved. The effect that gives each opened sheet a fresh form also chose whose account it connects, by reading the page’s connections. The backoffice is live: it re-reads a page’s data whenever anything changes (a board card from Ravi, a webhook), each read brought new connections, and the effect ran again and cleared the form.

  • An effect that resets a form follows only what should reset it (the sheet that opened): read that one value, then do the rest inside untrack(). The project brief does the same with the project’s id (loadedFor).
  • On a live page, keep a sheet open and type while the data changes (save in another tab, or wait for a board card): what is typed stays.

A fix that never reaches the tab it is tested in

The Connections form that emptied itself was fixed and live, and still emptied itself in the backoffice tab that had been open since before the deploy: a tab keeps the code it loaded, while its live updates and navigations fetch data from the new server. The fix looked like it had failed.

  • Load the next page fresh once a release is out: SvelteKit notices one by itself (the x-sveltekit-version header, the tab regaining focus, an hourly check) and sets updated.current; the root layout’s beforeNavigate then sends the next click to the new code (src/lib/fresh-release.ts). An open sheet or a filter changes the address without navigating, so nobody is reloaded in the middle of a form.
  • Check a fix after a deploy in a tab loaded after it (Cmd+Shift+R), and ask whoever reports it still broken whether their tab was open before.
  • A page opened while a release lands can ask for a script the new version no longer has (a 404 under /_app/immutable/), and its first load ended on the 500 page: src/hooks.client.ts loads it again from the version there now, at most once in half a minute.

A list that is empty because the question found nothing

Backoffice → Studio models showed Higgsfield and OpenRouter as not connected while both accounts were saved and the studio was already making with them. DivanWorks’ own accounts are kept with an empty owner, and the page asked for them with .in('owner', ['']); PostgREST reads an in list holding only the empty string as an empty list and answers with no rows and no error. To the page, a question asked wrongly looked the same as nothing being there, and the key looked refused.

  • Ask for one value with eq, never with an in list of one: connections are asked for through byOwner (src/lib/server/gateway/connections.ts), which does that. An empty string cannot stand alone in a PostgREST in list.
  • When a page says something is missing (Not connected, no rows), look at the row in the database before changing the form that saves it; and make a test’s stand-in answer as the real service does (tests/gateway.test.ts answers in as PostgREST does).

A remote command called inside an effect

The studio’s Share sheet loaded its list with a command from the $effect that runs when it opens. A command keeps reactive state of its own, so the effect came to depend on what it changed and ran again without end: Svelte stopped it (effect_update_depth_exceeded) and the page showed “This page didn’t load”.

  • Call a command from an event handler. When something must load as a sheet opens, do it inside untrack(() => …) in the effect, so the effect depends on the sheet being open and nothing else.
  • A query may be called in an effect (that is what it is for); a command may not.

A filter whose choices show the same list

The studio’s Generations, Projects and Elements pages offered four filters: Mine, Shared with me, Workspace and Company. With one workspace and one person making things, Mine, Workspace and Company showed the same list and Shared with me was empty: four choices that changed nothing, and whoever tried them learned only that the page was more complicated than it looked.

  • Offer a choice only for a difference people have: before adding one, name the case where it shows something the others do not. Fold a list that is usually empty (shared with me) into the main one, and mark the items that differ (Shared by …).
  • Hide a filter while its choices would show the same list, and show it when they would not (offersMine in src/lib/server/studio/lists.ts). A choice the menu at the top already makes (the workspace) does not come back as a filter.

A tick that waits for the page to load again

Ticking an item on a stage’s checklist sent it, then read the whole studio again (invalidateAll), and the live update read it once more: the tick showed three to five seconds later and looked as if it had not taken. The lead menu opened on “…” for as long while it asked who could lead.

  • Show a tick, an added item, a removed one or a choice at once, from local state, then send it; put it back with a toast if it fails.
  • Read again only what changed: a load that depends on a name (depends('studio:pipeline')) and invalidate(name), not invalidateAll().
  • A menu whose choices come from the server reads them when its view opens, not when the menu is pressed.

Something of one view left showing in the next

On a line’s Pipeline tab, the field to add an item stayed open after another stage was picked, so the next item would have gone to the wrong stage; and the space’s one-time how-to (about scenes and the composer) showed above a pipeline it does not explain.

  • Tie an inline field to the list it adds to: open for that stage or folder, closed when another is picked.
  • A how-to card shows on the view it explains, not on the other tabs of the page.

A Create that closes without a word

Making a company in the studio closed its sheet and opened Home, and nothing said a company was made. On a Home that looked the same, the founders saw nothing happen, pressed Create again, and made three companies on one domain.

  • After a Create, say what was made (a toast with its name) and open it (the new company’s page).
  • Something there may be one of (one company per domain) refuses a second, under the field, with what to do instead: whom to ask for an invitation.
  • Press every Create and Join, then look: the page says what changed.

A try with no catch

Joining from the studio’s invitation note, hiding the guide, switching workspace and adding a canon picture waited for the server inside try … finally with no catch, or dropped an answer that was not ok. When the server said no, nothing showed, and the press looked broken.

  • Catch it and say the problem in the page’s language: under the field, or in a toast.
  • pnpm divan:lint flags a try that awaits, with a finally and no catch (try-without-catch). A call that says its own problems (passGate in gates.ts) gets divan-ignore-next-line above the try, with the reason.
  • A fetch that answers not ok is a problem too: say it.

A reused part that keeps the words of its first place

The sign-in form, reused in the account page’s Set a Password sheet, ended with “Back to Sign In”, though nobody there was signing in; and the account page kept its tab title “My activity” while it showed the sign-in.

  • Give a reused part the words of where it is: in a sheet the way out is Cancel.
  • The tab title names what the page shows now, not what it usually shows.
  • Open each place a component is reused and read every word it shows there.
  • A section that takes a new kind of item gives it its own way onward: the Pipeline’s “Checked by the studio” offered Open releases under “Every file has the fields this gate needs”, which is filled in from the line’s files, not its releases.

A sign-in that hides its fields behind a button

The studio and the backoffice showed one Sign In button that led to the account page on another address. The e-mail and password fields were there, one step away, and the founders took it that signing in with a password did not exist.

  • Put every way in on the screen where people sign in: Continue with Google, the e-mail and password, Create an Account, Forgot Your Password.
  • Reuse one sign-in part (SignIn.svelte) everywhere, so every app signs in the same way to the same account.
  • Sign out and open each app: its first screen shows the fields.

A form step under the page’s own heading

The account page kept its heading “Sign in to DivanWorks” over every step of the sign-in, so “Create an account” and “Check your e-mail” sat under a heading that said something else; the terms line moved between steps, and the Show button made its label row taller than the e-mail’s.

  • A form with steps owns its heading: one heading and one line under it per step, in the place’s own size (the page’s h1, a card’s h2, none in a sheet that has its own title).
  • Keep the same things in the same order on every step: the form, its links, then what applies to all of them (the terms) last.
  • A control in a label row (Show) stays out of the row’s height and ends flush with the field.
  • What happened before (signed out, what Google answered, signed in as someone) is a quiet note under the heading, never above it.

A press with no sign that it was taken

Opening a page in the studio, the brand book or the account page waited a second or more for the server or for the page’s code, and nothing changed until the new page appeared: no spinner, nothing dimmed. On a phone the drawer closed on the press, so even the row that was pressed was gone. People could not tell whether the tap had worked, and tapped again.

  • Most pages need nothing: the root layout calls trackPresses() (src/lib/press.svelte.ts). From 150 ms after a press, the Button or SideMenu row that opened a page shows a spinner in place of its icon and any other link or row breathes; when what was pressed is out of sight (a drawer or a menu that closed on the press), a small spinner shows at the top of the screen. What is ready at once shows nothing.
  • A Button whose onclick returns a promise (a command, a save) stays busy until it settles and ignores a second press: return the promise (onclick={() => save()}, or an async function), never start it and drop it. A button busy for a reason of its own takes pending={busy}.
  • Forms: import enhance from #lib/forms.js, never from $app/forms; the button that sent the form shows a spinner until the answer is applied. pnpm divan:lint flags it (enhance-without-pending).
  • Make the wait short as well: a layout load that reads the address runs again on every click, so it reads only what every page under it needs.

A press before the page has started

On a slow connection a page shows seconds before its code runs. A button pressed in that time did nothing at all, and the sign-in form, which only the code sends, went the browser’s own way: a GET to the same page with the e-mail and password in the address (?email=…&password=…), where the browser’s history, the server’s logs and the analytics keep them.

  • src/app.html holds a small script that runs before anything else: a press shows at once (it breathes), a form without method="post" is held instead of sent, and once the page is ready trackPresses() makes the last held press again, so it is not lost. Keep the script first in the head and small; tests/early-press.test.ts checks it.
  • A form only the page’s code sends needs no method and no action. A form that must also work without the code (Sign in with Google) has method="POST" and an action, and the script lets it go.
  • Check on Slow 4G: reload, and press the page’s main button and a link before it finishes loading.

A busy button that only fades

Save, Create and Send in the studio’s sheets, the sign-in and Connections were disabled while their form was on its way: they faded to the unavailable colour and nothing turned, so a slow save looked like a button that had stopped working. The Delete and Remove buttons behind ConfirmButton showed nothing at all after the second press.

  • The button doing the work takes pending={busy}: a spinner in place of its icon, its colour kept, presses ignored. disabled stays for the other reasons: disabled={!target} pending={busy}.
  • ConfirmButton’s onconfirm returns its promise (onconfirm={() => remove(id)}) and the button shows a spinner until it settles.
  • pnpm divan:lint flags a submit button disabled by a busy flag in a form without use:enhance (busy-submit-dims); enhance from #lib/forms.js already turns the spinner on the button that sent the form.

A menu row that forgets what was chosen

The backoffice’s side menu built every row from its path alone, so its Episode names rows (Overview, Entries, Donors, Donations) dropped ?id=: pick a round other than the default, press Entries in the menu, and the page was back on the default round. And because ?id= changed, the section’s layout loaded everything again on the server at every press, though the links inside the pages kept the round.

  • A menu row to another page of the section you are in keeps what that section’s layout reads from the address: list it in NAV_KEEPS (src/lib/backoffice-nav.ts) and build the row’s href with navQuery(path, current, page.url.searchParams). Which row is current still comes from the path alone.
  • Keep only what the pages share (the round); a page’s own filter or sort stays on that page.
  • A test fails when a backoffice layout reads a value from the address that NAV_KEEPS does not list (tests/backoffice-nav.test.ts). In another app, pick something other than the default and press each menu row of that section: the choice stays.

A layout that loads again on every click

The studio’s layout read the page’s address (url.pathname, to find the project a link points into), and SvelteKit runs a load again whenever anything it read changes. So every click (Generations to Projects, one line of a project to the next) read the person, the workspace, its projects, canon, credit, guide and models again: 57 KB and 0.8 to 1.3 seconds before the next page showed. My activity on app.divanworks.com read its sections’ address the same way.

  • A layout depends only on what can change what it shows. Read the address inside untrack(() => …) from the load’s event, and read plainly only the part that matters: params.id (a layout’s params include its pages’), url.searchParams.get('project').
  • Read that part on every page, not only where it is used: a load is checked against what it read the last time it ran, so an id read only inside a project is not noticed on the way into one.
  • Name the layout’s data (depends('studio:work')) so a change can read it again with invalidate('studio:work'); after a change that touches everything, invalidateAll().
  • Click between the pages with the Network panel open: each click asks for the page’s own data only.

A page that takes what it needs from parent()

A project’s pages took the project from parent(), and the backoffice’s Episode names pages took the chosen round, its entries and the rounds’ titles from it. On the server, parent() runs every layout above the page, even when the browser keeps their data and the answer leaves it out: asking for a line’s page alone still took 1.3 seconds, and every Episode names tab (0.45 to 0.6 seconds) spent about 0.35 of them on the layout’s five queries again.

  • A page that needs what its layout also reads gets it itself, through a helper both call that keeps it for the request by event.locals: studioProject in src/lib/server/studio/context.ts, episodeRounds and roundEntries in src/lib/server/experience-context.ts. A full load, or the one after an action, still reads it once.
  • Move the working-out into the helper too (which round ?id= picks, which entries it has), and let each page read only the part it uses: Entries needs the entries’ ids, not the board with every total.
  • Read the address in the helper on every call, also when the answer is already kept: a load runs again when something it read itself changes, so a page that reads ?id= only through its layout does not follow a change of round.
  • A page that does not wait for its layout does not wait for the layout’s checks either: the helper asks for an admin itself (requireAdmin). A signed-out visitor can ask for a page’s __data.json alone.
  • pnpm divan:lint flags parent() in a +page.server.ts or +layout.server.ts (server-load-parent). A page that needs everything a quick layout worked out may keep it, with divan-ignore and the reason.

A promise in a layout’s data

The studio layout returned the composer’s model list as a promise, so SvelteKit sent its data as a stream (text/sveltekit-data), which Cloudflare does not compress by default: 55 KB of models went out raw again on every refresh (each live change, each action), close to the size that stalls in Iran. The backoffice layout streamed its menu’s two counts, 63 bytes; it runs on every click, so every backoffice page’s data went out uncompressed with them: People 546 KB, Comments 157 KB. As plain JSON the same answer is compressed: the studio’s 58 KB to about 10 KB. Pages that stream from their own load went out raw the same way (the backoffice Board 37 KB, Webhook events 112 KB) until the zone got a compression rule for that type.

  • Return no promise from a layout’s load: await what is quick (the page’s own load runs alongside, so it seldom waits), and let the one part that shows something slow or big ask for it once, apart from the layout: the composer asks src/routes/studio/models.json for its models (src/lib/studio/models.ts).
  • Stream only from a page’s load, and only what is slow (A slow outside call in a layout that every page waits for). The divanworks.com zone has a Compression Rule, compress_sveltekit_data (Cloudflare → divanworks.com → Rules → Compression Rules), that compresses text/sveltekit-data at the edge (zstd, else brotli, else gzip) and still passes each piece on as it comes: Board’s data went from 37 KB to 10 KB and Webhook events’ from 112 KB to 29 KB, and Instagram’s slow parts still arrive one by one, the last 1.4 s in. The rule lives in the zone, not in this repository: keep it.
  • Do not compress the stream in the Worker instead: its gzip, brotli and CompressionStream hold everything back until the last promise settles, so the page would wait for its slowest part. The edge’s compression sends each piece as it comes.
  • In the Network panel, a __data.json of type text/sveltekit-data has content-encoding zstd. If it has none, the zone rule is gone or off: put it back (http.response.content_type.media_type eq "text/sveltekit-data", compress_response with zstd, brotli, gzip). pnpm divan:lint flags a promise among a layout’s values (streamed-layout-data).

A panel that keeps what it read before a change

The studio’s viewer read an asset’s lines once, from a remote query. After Use in, the toast said “Used in Films” and the grid said Films, yet the open viewer still said “No line uses it yet”: the page’s data was read again, the query’s answer was not.

  • What a panel shows about the thing it is open on comes from the page’s data, which every change reads again (invalidateAll); a remote query fills only what the page does not have, and is asked again (or refreshed) after a change it shows.
  • After each change made from a sheet or a panel, look at it without reopening it: everything it says is the new state.
  • A page that keeps what is open while its data is read again (the Story Room keeps the open file, so typing is never lost) lets go of it after a change made outside the editor: Lock, Reset and the like drop what it kept, then read again. Locking a file from its … menu left it showing unlocked and editable until a reload.
  • A card drawn in another app is drawn again from the result it first came with: after a reload, Claude showed a chat’s Studio cards from their proposals, so an accepted card offered Accept again. When it is shown, the card asks Studio how it stands now (card_now, src/lib/server/studio/connector-mcp.ts) and draws that.

A button that acts on a part the page does not have

The Canon’s page opened the studio’s viewer with Animate, Recreate, Use as reference, Keep seed and New Version: each fills the composer, which the Canon’s page does not dock. A press closed the viewer and nothing else happened, and the next composer the person opened elsewhere carried that hidden draft.

  • Offer only what has somewhere to show its result on this page; a shared component is told what the page has (GenerationGrid’s making: the Canon’s page docks the composer now, and only for someone who may make there).
  • Open each shared panel on every page that uses it, and press every button: each one shows its result there.

What was just made, looked for by its name

After making a text, the Files page looked for it by its title in the data it had just read again: the new file’s name had been cleaned (“E01- A note.md”), so nothing matched and the text never opened.

  • Go to what the server says it made: the id or path in the command’s answer, never a search of the page’s data.

A field saved before it is whole

The file editor saves as you type, and a file’s code with it. A half-typed code (“WHC_S01E”) is not a code yet. On a picture’s or an item’s file, where the code is all a person may change, the save went without it, was refused, and the page said the save had failed.

  • Send a field only once it is whole and new: until then, say beside it what it still needs and send nothing for it; the rest of the page keeps saving.

State written while a page is drawn

The room’s line picker read the line this browser kept from inside a $derived, and wrote it into shared state there. The server drew the page, but in the browser Svelte stopped it (state_unsafe_mutation), and every project opened on a 500 page.

  • Read what the browser keeps (localStorage) in onMount or an $effect, as Persisted.connect() does; a getter used in $derived or the template only reads.
  • After a deploy, open each changed page in a browser and read its console: a page the server draws can still stop in the browser.

A list the browser makes inside a paragraph

In the editor that edits a text as it reads, Chrome’s list command put the new list inside the paragraph it was in (<p><ul>…</ul></p>), and Enter after the list put the next paragraph inside that one too. Turned back into Markdown, the list became one line of words, and the cursor jumped to the start of the item. Moving the list out by hand afterwards fixed the shape but broke Undo (see “Undo that stops working in an editor”).

  • Leave the shapes Chrome makes where they are: when turning the page into Markdown, read a paragraph that holds blocks as a container and ignore styled spans; draw them right with styles (a paragraph holding blocks spaces them as the page does).
  • Make lists through one helper that saves the cursor (by its text node) before the command and puts it back after: a change of selection, not of the page.

Undo that stops working in an editor

The editor that edits a text as it reads tidied the page after each change by moving its elements by hand (a list out of a paragraph, a span’s words out of the span). The browser’s Undo keeps only what its own editing did, so Cmd+Z then put back half a change: a joined line came back while the heading kept its words.

  • Change an editable page only through the browser’s own editing (document.execCommand: formatBlock, outdent, insertHTML, createLink, unlink…), or through an editor with its own history; a change of selection is fine.
  • After building or changing an editor, test Undo after each kind of change: typing, Enter and Backspace across blocks, each button of its bar, a shortcut, a paste.

A writing area built on the browser’s own editing

The Canon’s editor edited its page with the browser’s commands (contenteditable and execCommand). It drew a copper ring around the whole text that ended where the column was cut, had six buttons, a thin grey cursor that was hard to find, and every fix for one browser’s shapes (a list inside a paragraph, a styled span) broke something else: Undo, links, a table that could not grow.

  • Build a writing area on an editor with its own document and history (ProseMirror: src/lib/studio/editor.ts), with Markdown in and out (editor-markdown.ts), tested both ways.
  • Give it a bar with every format: text style, bold, italic, strikethrough, code, lists and checklists, quote, code block, divider, link, a table’s rows and columns, undo and redo; it stays in sight while the text scrolls and shows what is on.
  • Show where the writing is: a copper cursor (caret-color) and the line being written lit by tone. No ring or line around the text: the card’s tone is the edge.

Two lists that come back as one

In the Canon’s editor a list, then a checklist below it, were two lists; kept as Markdown both started with “- ”, and Markdown reads lists with the same sign side by side as one list, so after a reload the checklist’s task sat inside the first list.

  • When a list follows another of its kind, write it with the other sign (“*” after “-”, “1)” after “1.”): Markdown starts a new list when the sign changes. Count only what is written (an empty line writes nothing).
  • Test the way back too: a document with lists side by side, kept and read again, has as many lists as it had.

A live refresh that cuts the page’s own re-read short

On a story’s Contents, Move Down said “2 files re-coded” while the list kept the old order for four more seconds, and New Shot After closed its sheet but opened the new file six seconds later. The change pinged the workspace, the live refresh began 0.4 s later while the page was still re-reading after the change, and SvelteKit drops an invalidation once a newer one starts: the page’s await invalidateAll() returned before its data came.

  • A re-read nobody pressed for (a live ping, a timer, the tab coming back) waits until no page data is loading: connectLive does it, and a page that looks again on a beat calls readInBackground() from #lib/live-read.js (src/lib/data-loads.ts counts the loads).
  • Say a change is done only once the page shows it: the toast comes after the page’s own re-read, never before.
  • pnpm divan:lint flags invalidateAll() on a timer or when the tab comes back (background-reread).

A card whose title changes when it is accepted

Dabir’s card for a new item read “A new character: @simorgh”; once accepted it read “A change to @simorgh”. The card told a new item from a change by whether it had an id, and accepting stored the new item’s id on it.

  • Keep what a card is (new, or a change) in a field of its own, or in one nothing after it fills in; accepting changes only its state.
  • Accept and discard every kind of card a page offers, then read each again: its title still says what it was.

A scheduled job whose failures reach only the logs

The check that reads missed comments from Zernio every 10 minutes stopped on every YouTube run from 14 Nov (a private video answered 403 and ended the whole pass), and nobody saw it for eight days: its failures went only to the Worker’s logs, and the Comments page looked the same with it or without it. Nine more scheduled jobs were the same (missed DMs, the reply and DM workers, Insights, People, the evening story, Studio’s sweep, the Trends saves), and the Rounds page did the reverse: a Note the moment one Reymit read failed, and nothing once reads stopped coming.

  • Keep each scheduled job’s last run where its work shows: runJob or recordRun (src/lib/server/job-status.ts) write when it ran, why it stopped and when it last went through. tests/job-health.test.ts fails for a job route that does not.
  • Show it on that page as one quiet line (JobLine, src/lib/components/backoffice/JobLine.svelte), and make it stand out (a Note with a way forward, such as Check Now) only once no run has gone through for six of its beats: an hour for a 10-minute job, three minutes for the 30-second reply worker. A single rate limit stays quiet.
  • For a job the scheduler calls only when something is due, count that while from when the oldest thing fell due (runHealth’s dueSince), not from its last run: hours without a run are right when nothing waits. A job that runs once at a set time stands out a short grace after it (onceHealth).
  • Tell that while by the page’s own clock as well as by what the job writes: a job that stops coming writes nothing.
  • Let that clock move only while the tab is visible (JobLine does). A hidden tab skips the live re-reads, so a clock that kept going would turn its old rows into a false alarm for whoever comes back to it.
  • JobLine’s action is that way forward: it shows only in the late Note. A run people may want at any time (Model changes’ Check Now: a release they heard of) is its own button beside the line, the same call in both places.

A stream’s named events read as messages

A page reading a server-sent stream took every data: line for one of its messages. The server also sends events it names (event: idle when nothing is left, event: ping), whose data is something else, and the page broke on the first one: the Dabir Room’s page did not load.

  • Read each event’s type before its data: only unnamed events carry the stream’s messages. Act on a named one by its name, or skip it.
  • Check that a message holds what it must (its number) before using it, so one the page does not know is skipped, not drawn.

A menu that takes the focus back after a press elsewhere

The text editor’s style and link menus gave the focus back to the text whenever they closed, even when a press in the room’s chat beside them had closed them. The words the person typed next went into the open scene and were saved there.

  • Give the focus back to where a menu was opened from only when it closed from within: a choice, or Escape.
  • Mark a press or focus outside (onInteractOutside, onFocusOutside) and leave the focus where the person put it. Divan’s lint flags onCloseAutoFocus without it.

A one-line field that cuts a person’s own words

A question card took the person’s own answer in a one-line field that stopped at 200 characters, while the server took 2,000. A gate’s reason was cut mid-sentence without anyone seeing it, and the cut reason was what the gate kept.

  • Give words of the person’s own (an answer, a reason, a note) a field that grows with them and takes as much as the server does.
  • Keep a one-line field for a name, a title or a number.

A checklist item ticked by hand that a step already checks

Films’ Idea and Development kept their old checklists beside the playbook’s steps, which Studio checks by itself. Nobody ticked the old items, so every gate passed from the room needed a manager’s override and listed as open what the room had just done.

  • Where a step checks something by itself, the step is the item: don’t offer a tick for it or count it twice (src/lib/studio/pipeline.ts COVERED_BY).
  • An item stays to tick only where nothing checks it.

Words that say something opened when nothing did

Dabir said a scene was “open beside the chat for you to write”, because its tool told it so, but the room opened nothing: the person looked for the scene and had to open it by hand.

  • What a tool tells the model happened must be what the screen does, on a phone as on a wide screen.
  • When the words promise a file opens, open it, or say where its card is.

A known cause shown as a failure with no reason

When the AI account ran out of credit, every answer in the room said only “This answer stopped partway. Write again to go on.” The room tried the turn again half a second later, which failed the same way. Writing again could never work, and nobody was told why.

  • When the cause is known (an account out of credit, a day’s cap spent, a company’s credit), say it in the person’s words and say what brings it back.
  • Don’t retry what will only be refused again: end it once.

An empty state shown before the data is read

Switching the room’s language showed the empty room’s words (“Tell Dabir what you want to make…”) for a few seconds, then the whole conversation appeared under them.

  • Show what an empty page says only once its data has been read and is empty; until then, show nothing or a skeleton.

Parts still at work after the whole is done

The room of experts said “Done · 15 ideas” while every expert’s row still said “Scoring the ideas”, with its live mark, because each expert’s last word was a step, not an end.

  • When the whole is done, show each part that was still at work as done too.
  • Never show a live mark under a finished whole.

Starter folders beside the work’s real order

Every line of a new project started with folders Studio made from a template (Scene 1, 2, 3; Chapter 1, 2, 3), while the story’s own scenes, in their order and with their codes and titles, lived in the Canon. Films’ menu showed Scene 1, 2, 3, empty, beside SC010 Riding the Wind, and people asked which one was the scene.

  • Show a part of the work from where its order is kept: a line’s units come from the Canon’s story order, each with what was made for it, and open its file.
  • Make no placeholders of it. Leave out what a template made that holds nothing; one that holds work stays, as any folder.

A list chosen by a field the data seldom fills

A line’s scenes were picked from the Canon’s files by the line written beside each file, which most files leave empty: a coded file’s line is its code’s. The tests passed on rows made up with that line filled in, and the live Films page showed Scenes with nothing under it.

  • Decide what belongs in a list by the rule the rest of the app uses, through its one function (a Canon file’s line: lineOfCode, as the Contents read it), not by a field that looks right.
  • Make test rows from real ones (read from the live data, empty fields and all), and open the page with a real story before calling it done.

A page that asks the database one thing at a time

A story’s Films page asked the database 62 things, in eight rounds that each waited for the one before: the studio’s frame found the person, then their companies, then their workspaces, then twelve more things, and the project’s layout, its room’s bar and its Overview each read the pipeline again; the Canon’s repo row went out nine times. A Worker keeps six connections open at a time, so the rest waited in line, and each answer took ~130 ms from Stockholm: 1.5 to 2.5 seconds before the page showed. It asks about 28 things now.

  • Ask in one round what does not need another answer first: Promise.all from the start (what depends on the person alone goes beside their workspaces), never one await after another.
  • Ask once what several loads of a page need: readOnce from #lib/server/read-once.js (pipelineOnce, canonRepoRowOnce, canonIndexOnce), and work out small facts (is the story for children, each item’s handle) from what was read. A write, and a read after it, calls the reader itself. pnpm divan:lint flags pipelineOf, canonRepoRow and listCanonIndex in a load (load-reads-again).
  • Make one question of what can be one: several platforms’ connections at once (connectionsOf), a company with its workspaces (studio_companies(…, studio_workspaces(…))). Skip a check that cannot change the answer: a workspace’s managers have no shares to look up.
  • Keep the Worker beside the database (placement.region in wrangler.jsonc: aws:eu-central-1, where Supabase is). Static files still come from the data center nearest the visitor.
  • Count before and after: Supabase’s logs (edge_logs) for the seconds of one page load list every question it asked.

A frame that reads what one page shows

The studio’s layout worked out the guide to a first story (five questions to the database, in two rounds) on every page, though only Getting started shows it, and read each project’s lines for a helper that gives every line whatever it is handed.

  • A layout reads only what its frame draws (the menu, the header, the composer). What one page shows is that page’s load.
  • Before adding to a layout’s data, find who reads it (data.name across src/routes): one page means it is that page’s.
  • When a helper no longer uses what it is handed, stop reading it for that helper.

Coming back to a tab reads the whole page again

A live page read all its data again whenever its tab was looked at, even after a glance at another tab with nothing changed: in the studio that was the whole page (60-odd questions to the database, about two seconds) on every switch, and the click that came right after waited behind it.

  • Read again on coming back only when something may be missing: a change heard while the tab was hidden, the socket down, or a minute away (long enough for a phone to put it to sleep). connectLive in #lib/episode-live.svelte.ts does it for every live page.
  • Switch tabs with the Network panel open: coming back after a moment asks for nothing; after a change made elsewhere, the page reads once.

A screen shared by many places whose calls do not say which

Every line’s page became its room through one Room.svelte. Its calls to the room (its conversation, a turn, a yes) named no line, and the site took a call that named none as Films’, so Books’ page would have shown Films’ conversation and sent Books’ words to Films’ room. Nothing failed: each page just talked with the wrong room.

  • Give a screen used in many places one function that makes its addresses with what each is for (the room’s api(action) adds ?line= to every call), and send every call through it.
  • Keep a test that every call goes through it (tests/studio-line-guide.test.ts), and open two of them side by side once: each shows its own.

A page kept from one address to the next

SvelteKit keeps a page’s component when the address changes but the page does not. Going from Films’ room to Books’ room by the side menu kept Films’ conversation on screen, and its stream and its place in it, while the words typed went to Books’ room. Opening each room by its address showed nothing wrong.

  • Key a page’s part that holds its own state by what its address names: {#key data.place} around a line’s room, so each line’s starts afresh.
  • Or follow the change: an $effect on that part of the address that puts back what belonged to the last one.
  • Go from one address of a page to another of the same page by its links (one line’s room to another’s, one project to another), not by typing them: nothing of the first stays on screen or in what the page sends.

A page’s data named like what the frame reads

The studio’s frame (its side menu) reads what the Canon’s layout returns through page.data: the story’s tree, and whether it has earlier chats. That flag was first called chats, and the Earlier chats page returns its list as chats. page.data takes a page’s value over its layouts’, so on that page the menu would have found an array where it waited for a promise, and thrown.

  • Name what a layout returns for the frame so that no page under it uses the name (earlierChats, not chats); look through the pages under it before adding one.
  • A layout’s own code (+layout.svelte) reads its data prop, which no page shadows: only page.data mixes a page’s values with its layouts’.
  • Open every page under that layout once (the Canon: a file, Canvas, History, Earlier chats) and read the console.

A list keyed by what a model wrote

The room’s Ideas panel keyed each source of an idea by its book and line. An expert cited one line twice, once by the book’s title and path together, and once Studio read that as the path the two were one key. Svelte stops a list with a repeated key, so the whole room page fell to “This page didn’t load”, and History beside it still opened.

  • Key a list by something that is one per item by how it is made: an id Studio gives, or the item’s place when the list never changes order. Never by text a model or a person wrote: two can be the same.
  • Keep a model’s list once each where it is stored, too (onceEach in src/lib/server/studio/ideas.ts), so what is read back holds no repeats.

A remembered choice that is no longer one of the options

The studio keeps the line whose room a person was in last, so Ask Dabir on a file of the whole story, and Rules and skills, open on it. A room opens for a line the story does not use too (it offers to add the line), and visiting one kept that line: Rules and skills then opened on Books in a story without Books.

  • Keep a choice only when it is one the person works in: a line’s room once the line is in use.
  • Before using what was kept, check it against what is offered now, and fall back to the first that is: a line can be turned off after it was kept.
  • Visit a place that is not among the options (the room of a line the story does not use), then open what reads the kept choice.

A row that says Dabir proposed what Studio turned down

In the done-when test Dabir’s script for the rooftop had seven lines, Studio takes six on one card and turned it down, and the room’s row still read “Proposed a change to The rooftop”, with no card under it and no word of why. The person looked for a card that was never made.

  • A proposal whose answer comes back without waiting for the person made no card: say so on its row (Studio turned it down), with the dot of something set aside.
  • Keep the page’s list of tools that propose the same as Studio’s (PROPOSAL_TOOL_NAMES beside PROPOSAL_TOOLS, a test keeps them alike).
  • Ask Dabir for more than Studio allows (more than six lines under a scene’s script) and read the run’s rows.
  • A run resumed after the person’s yes hands the calls it settled in again: keep each on the row where it was asked. Drawn again in the new run, it read as a second proposal never decided, and once the turned-down state came, as turned down.

A total counted before it is known

Films’ bar said “Idea: step 1 of 12” before the story’s Format said whether it was a film or a series, then “step 3 of 10” once it said a film. Two of the twelve were a series’ steps: the person read it as steps lost or skipped.

  • Show “step n of m” only once what decides m is known; until then say “step n”.
  • Keep the total null in the data (statusOf’s step.of) and let each place that shows it (the bar, the map card, the home’s card, Dabir’s brief) say what it says without one.
  • Start a story and read its bar before the Format is set, and again after.

The past replayed as if it happened now

A room reads its old turns again when it opens and on each Show Earlier. Every proposal accepted in them came back as a result, and the page took each as a change made now and read the project’s data again: Gull Home’s Show Earlier set off a dozen loads of its pages and its spend, from Iran too.

  • Act on a change only when it happens while the page watches: keep the call ids of what the person decided here (decidedHere), and read again once for each of those, not for every result a replay hands in.
  • Open a long room with the Network panel and press Show Earlier: one read of its events a press, and no __data.json.

A press that comes back to the same card, saying nothing

Read the Pages on a scanned book’s cost card started a paid reading that could not start (the Room refused its token), and the book went back to “pictures of pages” with the reason kept on it. The card read that state and drew itself as before: the same price, the same button, no word that anything had been tried. People press it again, or think it is reading.

  • A state that a failed press returns to says why it is there again: the card reads the reason kept on the book (error) and says, in the page’s words, that the reading did not start (or why it stopped, and after how many pages), above the offer to try again.
  • Open the card after a press whose job you make fail (a token the Room refuses): it says so, and its button still works.

A cost under a cent shown as $0.00

A scanned book read from the pictures of its pages said it was read “for $0.00”: it cost $0.0029, and two decimals rounded it to nothing. A person reads that it was free, and the next reading (of a long book) surprises them.

  • Say a cost under half a cent in words, “less than a cent”, never $0.00 (spentWords in src/routes/studio/LibraryPanel.svelte).
  • An estimate rounds up instead (visionEstimate: at least a cent), so what a person is told before a spend is never less than what it costs.

A press that spends without saying what it costs

The generator put “Generate · about $0.30” on a video and a plain “Generate” on a picture: OpenRouter prices a picture model on that model’s own endpoints page, which Studio’s catalog never read. Make on a shot opens on a picture (its first frame, with Seedream 5.5), so the press people make most said nothing of its cost, though every press that spends is to show its price first.

  • Read every price a provider gives before offering its model: for a picture model, GET /api/v1/images/models/<id>/endpoints (perImagePrices in src/lib/studio/catalog.ts), for the pictures Studio offers first and makes first frames with.
  • Estimate a picture by the picture and by each picture sent with it, at the model’s high-resolution price at its largest resolution, rounded up to the cent (estimateImageCost): never less than it may cost.
  • Open the generator on a shot (a picture model) and on a video model, in both languages: Generate says about what the press costs, and a model priced by tokens says no number rather than a guess.
  • A take keeps what it cost. Higgsfield’s API says nothing of it, and its first take in Studio came back with none, so the viewer showed no price: record the price the press showed (higgsfieldCost in src/lib/server/studio/generate.ts).

A live refresh that throws the view away

The Canon’s canvas sat inside {#await data.canvas}. Every change to the Canon (a card accepted, a file saved, anyone’s change through the live refresh) reads the page’s data again, with a new promise, so the block went back to its Skeleton and drew a new canvas: where the person had panned and zoomed to, the kinds of line they hid and the card they pressed were gone, every time. The canvas also showed everything again whenever a new graph came, so keeping it on screen alone would not have kept the view.

  • Keep the last answer of a streamed part while the next one comes: an $effect puts the newest answer in a $state.raw with its project, and the Skeleton shows only before the first one (the canvas page, PlaceWork.svelte). A later read that is not ready (a failed one says off) leaves a ready view on screen.
  • A view a person moves (a canvas, a map) sets itself on its first draw and when they ask (Show All, Tidy Up), never on a new read: that one measures and places again, a new card where Studio puts it and a card that is gone dropped, and keeps the view, the lines hidden, the card pressed, Find and the places the person gave cards (keptOnRedraw in src/lib/studio/canvas.ts).
  • pnpm divan:lint flags {#await data.…} in a Studio page (reread-drops-view). On another live page (the backoffice), a streamed part that holds what a person is doing (a field, an attached file, a sheet) keeps its last answer the same way.

What one file filled in stays for the next

The composer keeps its settings in the browser, one set for every file. A shot that names its focal length (85mm) put it there, and the next file that named none kept it: the set picture made on a camera position’s file came out as an 85mm close-up where it should show the whole set, and at 16:9 where the film’s Look says 9:16, as nothing filled the frame for that kind of file.

  • When a file fills a form, clear what it fills and does not name, so nothing of the file before stays: startsFor in src/lib/studio/shot-note.ts gives the focal length as undefined, and the composer drops a key left undefined; a start frame Studio filled from one shot’s chosen picture goes when the next shot has none (filledStart on the Canon’s page).
  • Fill for every kind of file a take is made for (a shot, a camera position), not only the first kind built: each gets the Look’s frame.
  • Keep what the person changes by hand for the open file: fill once a file, as the composer does (startedFor).
  • Open a shot with a focal length, then a file without one, and read the composer’s settings.
  • A press that sets the form for one take puts back what it changed once that take is made, or the next fill comes: Final with MAGI-2 sets 1080p, the draft’s length and Draft first off, and the draft as a reference video. A draft made after it came out at 1080p, beside a video its model could not take (endFinal in src/lib/studio/composer.svelte.ts).

Asking a file what it is after letting it go

Use This Take lets the open file go (opened = null), so it loads again with the take linked, and then asked whether that file was a shot, to check the take against its set. The page’s file is worked out from what it had just let go, so the answer was always no: the check never ran, and nothing said so. Every test of the check’s parts passed.

  • Read what a step needs from the page’s state before the step resets it: const isShot = openFile?.type === 'Shot' before opened = null (useTake on the Canon’s page).
  • After a press that loads the open file again and starts more work (Use This Take and its check), look for that work’s own trace (its record, its call), not only for the press’s.

A preference written before it is read

The composer keeps its settings in the browser, and read them only once it opened. Make on a freshly opened Canon page fills the composer from the shot before that, so it filled it on the defaults and saved them over the person’s own: a video they had made silent came back with its sound on, at two thirds more, and the models they had picked went back to Studio’s. Entering a line’s space and Recreate did the same. Every test passed, as each ran in a page whose composer had already opened.

  • Read a preference kept in the browser before writing it: connect() in onMount of every component that writes it, or at the top of the function that does (the Canon’s page, Studio’s layout, reuse, keepSeed and animate in src/lib/studio/composer.svelte.ts). pnpm divan:lint catches a write with no connect() in its file (persisted-written-unread).
  • Open a page fresh and first press what fills a form kept in the browser (Make on a shot): what you chose before is still there.

A press turned away at once that promised its takes

Make on the Canon page closed the generator after every press and said “Making it. Each take shows below this file when it is done.” It said so also when Higgsfield turned every take away at once: first a key it did not accept, then an account with no API credit. No take was coming, and a take that did not finish is never a file, so the page showed nothing more. The person waited for takes that never came.

  • Look at what a press returned before promising anything: when every take failed at once, keep the generator open with the person’s words and say why and what to do (refused in src/routes/studio/Composer.svelte).
  • Show a file’s takes that did not finish beside it, with why: the Canon page lists the last day’s.
  • Press Generate with an account the platform turns away and read what the page says.

A check that never matches an element inside a frame

Play all puts an episode in HyperFrames’ player, whose page is a frame: a window of its own. A take that did not load was to be named under the player, and never was. The page heard the take’s error and asked e.target instanceof Element, which is false for every element of another window, since each window has its own Element. Nothing failed, and nothing was said.

  • Tell an element from a frame by what it is: node.nodeType === Node.ELEMENT_NODE, a property it has ((el as HTMLMediaElement).error), or the frame’s own class (frame.contentWindow.HTMLVideoElement). Never this window’s, with instanceof (pnpm divan:lint flags it in a file that reaches into a frame).
  • Check what a frame should say by making it happen: a take’s file missing, the message must come.

A Play that stops spinning before anything plays

Play All and Play Episode showed a spinner while HyperFrames’ player opened, and dropped it at the player’s ready event. Ready is not playing: the player then waits for the takes’ first frames, up to 8 s, with its own loading panel off so the page could show its own, and the page showed nothing. The button went back to Play and the picture stood still: a second or two on a fast connection, the whole 8 s on a slow one, as from Iran, after which it played on with stalls that nothing showed either. Play from a later shot waited the whole 8 s every time: Studio jumped there as soon as the player was ready, the runtime stopped loading the first take, and the wait still counted on it. The composer’s Listen played a voice’s sample with no spinner at all.

  • Keep a press that starts playing at work until it plays: until the player’s play event (starting in src/routes/studio/EpisodePlayer.svelte), or the promise of a media element’s play(), which settles once it sounds (listen in src/routes/studio/Composer.svelte). Give up on one that never comes after a while, so the button is not held for ever.
  • A player whose own loading look is off (assets-loading-ui="none") hands it to the page: show its waits yourself. HyperFrames’ player marks itself buffering when the cut stops for a take, and a spinner shows on the picture, which stays (buffering in openCutPlayer).
  • Spin on what was pressed: a shot’s own Play in the cut’s list, not Play All.
  • Jump to another second only once a player’s first wait is over (assets from openCutPlayer): that wait counts the takes at the start, and a seek before it ends makes the runtime stop loading them.
  • Check with the browser’s network slowed: press Play, and it spins until the picture moves.

A paid offer that stays after it was taken

Route A’s draft of Haft Rang’s SH0040 was finalized at 1080p for about $2.61. Its take card still said “Finalize at 1080p · about $2.61” while the final was being made, and after it was made, on the Canon page, the shot page and in the viewer. The server took a second press as well. A second press would have paid again for the same take.

  • Offer a paid action that makes one thing once. After the press, the offer goes, or says it is under way (“Being made at 1080p”), on every page that shows it (finalsOf, finalsFor, withFinals and offerAfter in src/lib/server/studio/store.ts).
  • Refuse a second press on the server too (“finalized”): two pages, or two people, can press at once. One that failed can be pressed again.
  • Where the page does not refresh by itself, say so in still words, not a Spinner that runs until a reload.
  • Press a paid action, then reload every page that shows it, and read what it offers.

Sound the browser held back, shown as a stop

Safari and every iPhone start sound only from a press, and only inside it. Play All’s press opens HyperFrames’ player first (its code, the runtime, the cut’s page), so by the time the score starts the press is spent. The browser refuses the score, the player moves it into Studio’s page, is refused there too, and plays on without it, saying playbackerror. Studio took that event for a stop: it showed Play while the picture moved in silence, and nothing said how to hear it.

  • After a player’s event, read the player’s own state (playing = !el.paused), never what the event’s name suggests.
  • When the browser holds sound back (NotAllowedError), say so beside the player, with a button that plays again inside its own press (Play With Sound in src/routes/studio/EpisodePlayer.svelte), from the player’s own second (el.currentTime): a play() alone starts the sound from a second the player kept, up to one back.
  • Check without an iPhone in Chrome with --autoplay-policy=user-gesture-required, holding the first load more than 5 s so the press runs out: the page says the sound is held, and Play With Sound starts it where the picture is.

A status said once and left standing

Accepting a 3D set’s card said “Accepted: Blender is building it.”, and the words stayed after Blender had finished, beside “Built with Blender 5.3.0”. On the place, the same set said “Not built yet” while Blender was building it, because the place read only whether the file linked a take. And the file’s take shelf offered Use This Take for the build Studio was about to link, until the page was loaded again. Each said what was true at one moment and was never read again.

  • Say a state from what is true now, and read it again while it can change: a running build is asked every few seconds wherever it shows (on its 3D set, and on its place), never told once from the press that started it.
  • Let a press say only what the press did (“Accepted”), and leave how the work stands to the Status beside it.
  • When the work ends, read the page again (invalidateAll), so what hangs on it (the file’s take, its labels) changes with it; and finish what the end brings before answering (a build’s take linked while the page waits: buildsNow in src/lib/server/studio/set3d.ts). When something else may end it (the minute’s sweep links a build’s take a few seconds after its own answer), ask until what the end brings is there where the page reads it (linked, judged by the Canon’s index, which follows the repo by up to a second), then read the page.

A once-only offer taken away by another way of making the same thing

Finalize at 1080p is offered while a draft has no final, since a second press would pay again for the same take. Studio then gained a second way to a draft’s final: Final with MAGI-2, which draws it from the draft for about $0.48. Counting every final of a draft as Finalize’s would have taken Finalize away after one such press, on every page that shows the draft, and left no way to the 1080p final the founders picked for Haft Rang.

  • Count only what the offer itself makes: Finalize makes the draft again with its own model, so only a final its draft’s model made takes the offer away (finalStates with each draft’s model, modelsOf in src/lib/server/studio/store.ts), in the server’s refusal too (finalizeDraft).
  • When a second way to make a thing comes, look at every once-only offer of the first: make one the new way, then read what each page offers.

One moment shown as two times

A page is drawn on the server, whose zone is UTC, then again in the browser, in the viewer’s own zone. A date or time formatted with no timeZone takes the zone of whatever draws it: on Haft Rang’s 3D set page one build said 11:43 in the set’s panel (Tehran time) and 10:14 in its take’s card just below (the browser’s), and until the browser draws the page it shows the server’s own UTC time. Ten more Studio views, the backoffice’s shared formats and the site’s own account pages did the same; Studio’s Today and Yesterday put a take made after midnight in Tehran under two days, and the composers’ schedule fields read the browser’s clock while the posts under them showed Tehran’s.

  • Show every moment in Tehran time, the one zone of Studio, the backoffice and the site: formatTime(at, lang, options) or timeFormat(lang, options) from #lib/time.js, never a new Intl.DateTimeFormat, toLocaleDateString or toLocaleTimeString of your own.
  • Group rows by the day they fall on with dayOf (Tehran’s day), so a day’s heading and its rows’ times agree. A schedule field (<input type="datetime-local">) takes wallClock and gives back fromWallClock, and says beside it that its time is Tehran’s.
  • A calendar day kept as YYYY-MM-DD (a chart’s day, a filter’s from and to) is no moment: format it at noon with timeZone: 'UTC', and no zone moves it.
  • The visitor’s own zone is for the public round’s end, as the founders asked, and for Learning’s free times and sessions, where a learner and a teacher each read their own clock: always with the zone’s name (viewerZone in src/lib/local-time.svelte.ts, zoneName and clockIn in src/lib/learning/zones.ts). pnpm divan:lint flags a date or time format with no timeZone, the local clock read by hand (getHours(), new Date(y, m, d) …) and viewerZone on a Studio or backoffice page (time-without-zone).

A switch that drops the menu into another level

Switching the workspace in the studio’s side menu went to the studio’s own address, which opened Projects, and the side menu followed the page into its Projects level: the switcher the person had just used was gone every time, and the menu stood in a level they had not opened.

  • After an action taken in a level of the menu (the workspace switcher, joining a company, opening another workspace from Settings), land on a page whose menu is that same level: the studio’s home, Getting started (STUDIO_HOME in src/lib/studio/home.ts).
  • A menu steps into a deeper level only when the person opens it (a row with opens, a page’s own link there). The app’s own address, and its name in the panel and in the phone’s bar, lead to its home, never to a collection that opens a level of its own.
  • Switch the workspace on a desktop and in the phone’s drawer: the menu stays on its level, its switcher showing the workspace just chosen.

Every choice offered while only one is ready

Getting started, New Project and Add a Line offered all seven lines as if each worked, but only Films had Dabir’s playbook: a project started in Books opened a room with nothing to guide it, and a sentence about a picture book started one there by itself.

  • Keep one list of what is open (OPEN_LINES and isOpenLine in src/lib/studio/lines.ts) and take every choice from it, on the page and on the server: createProjectCmd and addLineCmd refuse a line that is not open.
  • Show the rest where people choose, disabled, with the reason in quiet words (Soon: in a Select it is the option’s label, “Books · Soon”; on a tile or a row it sits under or beside the name), never hidden: people see what is coming.
  • Where the words name a choice that is not open, start in an open one and say so next to it (“Books opens soon, so the project starts in Films”). What was made before keeps working: a Books room already in use stays open.

A way in that is gone once it was used

Getting started offered Start a Story only as the first step of its checklist: once a first project existed the step was done and its button gone, and the founders looked for a way to start another. Its words said “story” while the menu, the sheet and Projects said New Project.

  • Keep a page’s main action at its top for whoever may take it, whatever the checklist under it says: Getting started leads with New Project, the page’s one filled button, and one plain sentence on what happens next.
  • A checklist lists every step, each one done as Done, until all are; the next step’s action is quieter (tinted) and never the only way in.
  • Call what people make and open by one name everywhere: a project (New Project, Projects, Start a Project). “Story” is what a project tells: its logline, its canon.

A decision that waits on others, with nothing said

Dabir proposed three episodes at once. The founder discarded one, and nothing happened: Dabir goes on only once every card of an answer is decided, and the room said so nowhere. Thinking it had stuck, they wrote in the chat, and that set the two cards still waiting aside without a word, so all three were proposed again.

  • When the person decides one card of several, say right under the conversation how many still wait and that Dabir goes on once they are decided, with a button that shows the next one (moreWait and showNext in src/lib/studio/room-words.ts).
  • Let a decision be changed while the others still wait (Accept Instead, Discard Instead on the card): the Room keeps it until the last one is decided (changeable in src/lib/studio/room-stream.ts).
  • Before something the person types sets waiting cards aside, say so under the box while they type (setsAside), and make the box’s placeholder say it is another way to answer.

An AI’s draft that can only be read

Dabir’s cards had Show, Accept and Discard. A founder who wanted one word changed in a proposed Format had to discard it and explain the change in the chat, or accept it and fix the file afterwards; a label Dabir left out could not be added on the card at all.

  • Treat whatever an AI proposes as a draft the person may change before they accept it: on the card, Edit opens its text in the Canon’s own editor, its labels in the labels sheet (every field of its type, so a missing one can be added), and a plan’s, a decision’s or an item’s words as fields (src/routes/studio/CardEditSheet.svelte).
  • Send only what the person changed; the Room merges it into the call and signs that, so Studio applies exactly what was accepted (services/dabir-room/src/edits.ts), and the file’s History says “changed and accepted”.

An empty editor that would replace a whole file

Dabir’s card that set the Format’s labels opened its Edit sheet with an empty text editor under the labels. The card had no text of its own, so anything typed there would have replaced the Format’s whole text with those few words.

  • Show an editor only for what the card would write: a change of labels alone shows its labels, never an empty text box (CardEditSheet.svelte keys).
  • When a text is to be changed, start the editor from the text the card would write, so what is kept and what is lost can be seen.

A total that waits for a reload

The header’s “This project: $0.00” stayed at what it read when the page opened, while the room’s own bar beside it rose with each turn to $0.21.

  • A total shown in two places changes in both at once: the room writes what its chat spent since the page opened (liveSpend in src/lib/studio/live-spend.svelte.ts), and the header adds it.
  • Read again what one action changes, not the whole page: a total is a sum the page can keep up to date itself.

An explanation left to the model

After Not Sure on one of Dabir’s questions, the same question came back three times with no word in between. Dabir was told, in its prompt and in the answer itself, to explain each choice before asking again: it thought the explanation through and went straight to the card.

  • Put what the person needs to decide on the card itself: after Not Sure, each answer comes back with what it would mean for this story under it (ask_choice’s meanings), and a form comes back filled in with Dabir’s suggestions (ask_form’s suggested).
  • Check it where the card is made: the agent sends the question back to the model until it has them (unsure_last in services/dabir-agent/dabir_agent/agent.py). Words in a prompt alone did not hold.

A notice about one platform’s account shown for a model made on another

Under the composer, “Connect OpenRouter in Settings › Connections” showed whenever the person had no OpenRouter account, even with a Higgsfield model chosen, which never goes through OpenRouter. Found on 28 November 2026 while adding Seedance 2.5 on BytePlus, Studio’s third route for video.

  • Tie each notice and each gate that names an account to the route of the model chosen (its provider: OpenRouter, Higgsfield, BytePlus), never to one platform’s account alone (ownRoute in src/routes/studio/Composer.svelte).
  • When a route is added, choose a model of each route and read every notice and every Generate that waits on an account.

A draft that cannot be changed before the yes

Dabir’s Make card offered only Make or Discard: its prompt, its model and that model’s options were fixed, and so were the checklist items it ticked off, the story order’s moves, a new item’s handle, and a question’s answers when Dabir allowed none of the person’s own (the founders, 2026-11-28: “before submiting all should be editable, selectable, and customizable also dependeing on selections like model selection we might have other options”).

  • Every proposal is the person’s draft: what each tool lets them change is listed once in the Room (services/dabir-room/src/edits.ts EDITABLE) and mirrored in src/lib/studio/card-edits.ts (CARD_EDITS, kept equal by a test); a card with something to change shows Edit (editableKeys), or is its own editor (the room of experts, the Make card).
  • A choice that depends on another shows only what that one offers: pick a model and the card offers its shapes, sizes and qualities, and the price follows. Every question takes the person’s own words, a form’s choice field too, in the room and on Studio’s card in Claude (src/lib/server/studio/connector-card-app.ts).

A card’s message to the chat, sent after a wait

Studio’s question card inside Claude kept the person’s answer in Studio first, then sent it into the chat as their next message (MCP Apps’ ui/message). Claude takes an app’s message only in the person’s own press, so after that wait it never reached the chat, and the card still said “Sent to Claude.” Found in the live test of question cards in claude.ai, 28 November 2026.

  • Send a card’s message into the chat in the press itself, before anything is awaited (answer in src/lib/server/studio/connector-card-app.ts), then keep the answer in Studio.
  • Never say it was sent: Claude may answer the card before the person agrees (the next pitfall).
  • In claude.ai, press an answer on a question card, then Allow once on Claude’s prompt within a few seconds, and read the chat: the answer comes in as Studio’s message and Claude answers it.

A card that said it was sent before the person agreed

Pressed, Studio’s question card inside Claude sent the answer into the chat and said “Sent to Claude.” as soon as claude.ai answered it, while claude.ai was still asking “DivanWorks Studio wants to send Claude a message” (Allow once, Decline). Claude may answer an app’s message before the person agrees, and never tells the app what they decided (Claude’s docs, Send messages). Allowed within seconds, the answer started Claude’s turn; allowed 20 minutes later, it never came, and the card still said it was sent. Found in the live recheck in claude.ai, 29 November 2026.

  • After sending, say what to do next, never that it went in: “Continue in the chat: allow Studio’s message, or send it from your message box.” (inChat in src/lib/studio/connector-words.ts). Only when Claude does not take it (isError, or an error) show the words for the person to send themselves.
  • Keep a way to send it again, in a press of its own (Send Again): a message allowed too late is lost.
  • Tell Claude where else the answer is kept (card_status), so a person who writes before the message comes is not asked again.

A way forward that points away from the card

A Make that made nothing said “Ask Dabir to try again” (2026-11-28), though one press on the card could make it again: the person had to write in the chat and wait for a new card, for what the card in front of them does.

  • When the card itself can do it, say so on the card, with the press right there: “Make it again, or change it first” over Make Again (MakeRoomCard.svelte).
  • Send the person elsewhere only for what cannot be done where they are, and name where.

A control that reads a field older cards do not have

On 28 November 2026 Make cards began to say their item’s kind (a character, a place, a prop), so the picture chosen is saved as what it shows (front, establishing …). The parrot’s sheets had been made that morning on a card from before, and that card would have offered no choice of what its picture shows: it read the kind from the new field only, which no card made before it has. Once its prompt was changed, the same card lost its price too (it priced every change by the model’s own prices, which it had none of, though the words do not change the price), and its first round’s line showed the draft being changed instead of what it was made with.

  • When something kept and shown again (a card, a take, a saved setting) gains a field, give every control that reads it a fallback from what the page already knows: the Make card takes the kind from the story’s item it was made for, by its @handle (makeItemKind in src/lib/studio/room-stream.ts).
  • Re-price only on a change the price follows (the model, how many, the size, the quality, what is sent: makePrice in src/lib/studio/room-stream.ts), and say what a round was made with from what it was sent with, never from the draft (roundMadeWith).
  • After the change, open one made before it, in a chat that has one: every control still shows and does what it says.

A price that is not what the person pays

The generator said “Generate · about $0.47”: what the press costs DivanWorks. Someone whose company pays is charged that plus the markup on the model’s platform, so the price read lower than the charge, and Finalize and Dabir’s Make card did the same. Found on 28 November 2026 while adding a markup per platform.

  • Show every price before a press as the person will be charged it: chargedPrice in src/lib/studio/fees.ts, with the markups the studio layout sends (credit.markups; none where they are not charged), or shownPrice in Dabir’s world.
  • Show the cost itself only to someone who is not charged: a @divanworks.com address, DivanWorks’ company, or a platform they connected an account of their own on.

A list made in place behind Svelte’s state

The room’s page keeps its conversation in $state, and applyChunk added a Make card’s rounds and the options chosen with (view.rounds[of] ??= []).push(round). The value of that assignment is the plain array, not the proxy Svelte keeps in view.rounds, so the push changed nothing the page could see: a round made again never showed as being made, and the option chosen with Use This One was saved but never marked, even after the page was read again (found in the first live Make Again, 28 November 2026).

  • Assign, then read it back through the object: view.rounds[of] ??= []; const rounds = view.rounds[of]; (lint rule assignment-value-behind-state).
  • Test code that changes the page’s state on that state, not only on a plain object, where it works: tests/room-rounds-live.test.ts uses Svelte’s own proxy.

A page that stops listening while what it started still runs

After Make Again, the room’s page asked the Room for what came next only while Dabir was running. A round made again is no turn of Dabir’s: when one of the Room’s responses ended (it keeps each open 25 seconds) before Studio had made the pictures (35 seconds for the parrot’s sheets), the page stopped asking, and the round showed only once the page was read again.

  • Keep asking while anything the page started is under way: a turn running, or a round being made (follow in Room.svelte goes on while convo.making has one).
  • Try the slowest case: a round that takes longer than one response, with the page left as it is.

A model listed once for each platform that sells it

With BytePlus and Higgsfield connected, the model picker listed Seedance 2.5 three times, on BytePlus, on Higgsfield and on OpenRouter, each a row of its own, and none said whose account would make it. Found on 29 November 2026 while giving Studio its own routes.

  • List a model once, on the route in use or else its first (oncePerModel in src/lib/studio/routes.ts), and say on every row whose account makes it: yours, the company’s or DivanWorks’.
  • Offer its other routes beside it (Runs On), and keep the route a person chose when a shot or a Sequel asks for the same model (keepRoute).

A main-site path check that takes over a subdomain’s own page

The server hook took every /learning path for Learning, on any host, and sent /learning on to /learning/en. backoffice.divanworks.com/learning is the backoffice’s own Learning page (src/hooks.ts sends each of its paths to /backoffice/…), so the backoffice’s Learning link, and the way back from Google after rooms@ said yes, opened a 404. Local dev and previews serve that page as /backoffice/learning, so only the live subdomain showed it. Found on 30 November 2026 while writing the setup guide.

  • Tell a site kept under a prefix of the main routes (/studio, /brand, /learning) with underPrefix(hostname, path, prefix) from src/lib/site.ts: it holds only where paths are those routes’ own (the main site, local dev, previews), never on a subdomain with pages of its own.
  • Once a subdomain’s new page is out, open it by its live address (backoffice.divanworks.com/…, not only /backoffice/… on local dev), and come back to it from each sign-in or consent it starts; tests/learning-site.test.ts runs the hook on backoffice.divanworks.com/learning.

Files and labels

A stored id shown in the words of the wrong list

Studio’s labels keep ids from one vocabulary, and Dabir’s proposal card looked each id up in every list: a shot’s frame rate of 24 showed as “24mm”, because 24 is also a focal length.

  • Show a stored id in the words of its own field’s list (valueWords in src/lib/studio/types.ts), never by searching every list.
  • Leave a number as a number unless its field says it is one of a list.
  • Test a value two lists share.

A change named with another kind’s word

A file’s History and the story’s History name each change by its kind (the Studio-Kind of its commit), and a kind with no word of its own fell back to Edited: files re-coded on the story’s ladder and a file locked or unlocked both read as Edited, and so would a new order Dabir proposed and the writer accepted.

  • Give every kind Studio commits (COMMIT_KINDS in src/lib/server/studio/canon-sync.ts) its own words in both languages (kinds in src/routes/studio/file-words.ts). tests/studio-authorship.test.ts fails for a kind without them.
  • Keep a fallback word only for what Studio did not write itself, never in place of the words one of its own kinds should have.

A number read only as far as its first comma or word

Studio’s labels read a typed number from its first digits. “50,000” in a budget was kept as 50, its comma read as a decimal one, and “90 minutes” in a running time counted in seconds as 90. Nothing said so: each looked like a number and was kept.

  • Read a number as people write it: a comma before groups of three digits (50,000) and the Persian thousands sign (۵۰٬۰۰۰) set thousands apart; only another comma (4,5) is a decimal one.
  • In a field with a unit, read the unit word as well: minutes and hours as seconds where the field counts seconds, a dollar sign where it counts dollars. A value in another unit (another currency) gets guidance beside it, never a different number.
  • Test what people type: thousands, a unit word, Persian digits (readNumber in src/lib/studio/types.ts).

A choice shown by its id

A field with values of its own (a Format’s kind, its audience) would list them in the Labels sheet as the file keeps them: “micro_series”, “kids_channels”, “8_12”. An id reads as a word with a typo, and in English on a Persian page too.

  • Give every value Studio defines its words in both languages (a list in the vocabulary, or OPTION_WORDS in src/lib/studio/types.ts), and show the words wherever the value shows: the choice, the tags under a file’s name, Dabir’s card. The file keeps the id.
  • Read the words back as the value: “Short film” and “فیلم کوتاه” are both short.
  • A test checks that every value of Studio’s own types has its words in both languages (tests/studio-format.test.ts).
  • A label’s own name needs its words too: a skill’s and an expert’s name showed as “name summary” and “name روانشناس”. A skill’s reads “Called with /summary”; an expert’s id, which only Dabir uses, is left out. A label that names Canon files says each by its name: an expert’s books read «شاهنامه», where the path کتابخانه/شاهنامه.md came out backwards in an English chip (src/lib/studio/file-badges.ts).
  • Name a story’s own expert by its file’s title wherever it shows: the Ideas panel said “روانشناس”, its id, for روان‌شناس (listIdeas’ byNames in src/lib/server/studio/ideas.ts).
  • Who backs an idea is named the same way on the cards a person’s own Claude proposes: Claude passes the experts’ ids, and its ideas card read “(story_editor)” (found live, 30 November 2026). cardView and ideasRoomCard name them with expertName and list them with nameList (src/lib/studio/room-words.ts), as the room’s Ideas do.
  • A file’s type is a value too: the chip above a bible file read “Premise” and “Decisions” on a Persian page, since the bible’s types had no words. TYPE_NAMES (src/lib/studio/types.ts) holds every type Studio writes, the bible’s and a line’s included, and a test checks each has both languages (tests/studio-bible-tables.test.ts).

A file shown by its text alone

An item’s file in the Canon (Zal, a character) keeps everything it says in its labels: its description, its names in both languages and how they are said, its pictures. Its item writes nothing below them. The room and the Canon page showed a file by its text alone, so every character, place and thing opened on an empty box, its labels were nowhere, not even in the Labels sheet, and its History showed every version empty.

  • Show a file by everything it holds: its labels as badges under its name, each named in the page’s language with its value in words (fileBadges in src/lib/studio/file-badges.ts), then its description and its pictures, clip or sound.
  • An item’s description is its text: show it where the text would be. Leave out what a person never reads, such as an item’s or an asset’s id.
  • A file that cannot be written here and has nothing to read says “Nothing written here yet”, never an empty box.
  • History shows what changed in each version, its description too: a version of an item’s file differs only in its labels.

Studio’s own labels shown as badges

A book’s record in the Library kept its id, the id of the upload it was read from and what it is under labels of their own, and the file showed every label as a badge: “library dc74b6c1…”, “from 2896e7b9…”, and “What to take: source”, because use is also a Reference’s field with another meaning.

  • Keep what Studio writes for itself under one reserved label (RESERVED_LABELS in src/lib/studio/okf.ts), so no person’s field can take its name.
  • Show such a label by what it means, with its own words (fileBadges in src/lib/studio/file-badges.ts), and never an id a person does not read.
  • Never reuse a label name a type already gives another meaning.

A new file in the page’s language, not the story’s

New Skill, New Type and New Expert wrote their starting text in the language the page was shown in. A Persian story opened with the page in English got an expert that began “You are the room’s روان‌شناس”, with its question in English, and Dabir and the room read it as the story’s own.

  • What goes into the story (a new file’s starting text, Studio’s own files, Reset) is in the story’s language: the server takes it from the Canon (studio_canon_repos.lang), never from the page. The page’s language is for the page’s own words.
  • A page’s request to make a file carries no language (src/routes/studio/canon.remote.ts). A test makes all three in a Persian story (tests/studio-experts.test.ts).
  • The room of experts writes its ideas in the story’s language too. It took the page’s, so a Persian story’s kept ideas came back in English: room_brief sends the story’s lang, and the Room writes in it (services/CONTRACT.md, section 3).

A tab named by the file name its whole kind shares

The Canon named an open file’s tab by its file name, and every skill’s file is SKILL.md and every expert’s EXPERT.md: each skill’s tab read “SKILL · Canon” and each expert’s “EXPERT · Canon”, so two open tabs, and the browser’s history, could not be told apart.

  • Name the tab of a page that shows one file by the file’s title, as its heading says it, and fall back to the file name only when it has none (canonFileTitle in src/routes/studio/+layout.svelte).

A label put inside a sentence as it is

The Rules and skills page names its two scopes “The story” and “Films”, as tabs. A skill’s note put that label inside a sentence, “Studio wrote this for The story”, and Earlier chats said “About The story”: a capital in the middle of a sentence, which reads like a mistake.

  • Give a label its own words for inside a sentence (theStory: “the story”) and use them there; a line’s name, Films, stays as it is.
  • Read every sentence that takes a name from elsewhere with each name it can get.

Studio’s own files named like the story’s

A row of Dabir’s reads said “Read 4 files: The Format, Format, Format, Premise”: Films’ Format file, the /format skill titled The Format, and the Format type, each by its title. Three Formats in a row read as one file read three times.

  • Name Studio’s own files by what they are wherever a person reads them: the /format skill, the Format type, Films’ rules, the story’s guardrails; the story’s own files by their titles.
  • Mark such a name as Studio’s (ToolTarget.own) so nothing swaps it for the file’s title on the way to the page.

A title cut in its one-line field beside its chips

A file’s title is a one-line field you can type into, given 15rem of its row beside its chips (Document, Source, the code, Labels, History). “Test scan (Persian)” showed as “Test scan (Persia”, cut mid-letter with no ellipsis, at a width as ordinary as a laptop beside the side menu; a Persian title lost its end the same way.

  • A one-line field cannot wrap: let it ask for the room its words need. Its basis grows with its text (about 0.6em a letter at its size), so a long title takes the whole row and its chips go under it (FileEditor.svelte).
  • A title that cannot be typed into is a heading that wraps (wrap-break-word), never a cut field.
  • Open a file with a long title, in English and Persian, beside the side menu: every letter shows.

A colour shown only as its code

Dabir’s cards, in Studio and in Claude, and a file’s labels showed a Look’s palette as “#1E4C9A, #2BA59B, #E8C547”: nobody sees a colour in its code. The Labels sheet drew a row of dots under the codes, with nothing to say which was which, and a dark one vanished into the sheet. A take’s main colours, measured from its picture, were written into its file and shown nowhere. In Persian a list of codes ran as one left-to-right run, so it read from its far end.

  • Show every #RRGGBB beside a box of its colour. labelParts and labelVisual (src/lib/studio/label-visuals.ts) decide it; ValueParts and Swatch draw it in Studio (Dabir’s card, a file’s badges, the Labels sheet, the composer’s palettes); Studio’s card inside Claude draws the same data, which it is given apart from the model (cardMeta’s marks).
  • One swatch for every place: Swatch draws only #RRGGBB, so a label’s text never reaches a style, and a colour as dark as Divan’s surfaces (isDarkColor) sits on a lighter tile (bg-selected), as a sample sits a step away from its own colour. pnpm divan:lint flags a background drawn by hand in Studio (swatch-by-hand).
  • Each code in its own <bdi dir="ltr">, the list in the page’s order with the page’s commas; a comma stays inside the value before it, so a line never starts with one.

A shot’s framing told in words alone

Dabir’s cards, a file’s labels and the Labels sheet’s choices said a shot’s framing, the camera’s angle and move, the time of day and the frame’s shape in words alone, where a filmmaker reads a picture faster: a shot-size chart, an arrow for a move, a rectangle of the frame’s shape.

  • Give a listed value a glyph where one helps (labelVisual in src/lib/studio/label-visuals.ts): framing, angle, move, composition, time of day, inside or outside, frame, look and light. A list where no picture helps (a genre, an era, a lens, a focal length its number says already) stays words: a glyph is never decoration.
  • Draw it as the site’s icons are drawn, once, for Studio and the card inside Claude: Lucide’s icon where it has a fitting one, else a glyph in Lucide’s grid and strokes; as tall as the text, muted, at the start of its words.
  • The field’s own list decides, never a guess from another list: overhead is a camera angle in one list and a light in another.
  • A glyph that shows a side in the world (a pan to the left, the weight on the right of the frame) never turns around in Persian.
  • A value added to one of these lists gets its glyph, or is named as one no picture says well: tests/studio-label-visuals.test.ts checks every value.

A list of sentences joined with commas

A place’s set plan holds a line per thing, and its lines have commas of their own (“@tile on the workbench, with fine brushes in a clay jar”). Dabir’s card, in Studio and in Claude, joined the lines with commas too, and so did the place’s badge: four lines read as one run-on sentence, and nobody could tell where one ended and the next began.

  • Show the values of a field whose values are sentences (a set plan), and any list whose values have commas of their own, a line each: labelLines (src/lib/studio/types.ts) says when, and ProposalCard.svelte and the card inside Claude (card-view.ts, which keeps line breaks) draw them so.
  • Where they must share one line (a file’s badge, a value in a sentence), join them with semicolons («؛» in Persian), never commas: labelWords and file-badges.ts do.
  • Keep commas for short values that are words, not sentences: a cast, a few camera moves, an expert’s books, the ways a film makes money.

A take’s new action in only one of the places it shows

Making video in Studio gave the take viewer two new actions: Put in the generator and Finalize at 1080p. The viewer opens from a line’s takes and from Generations. The Canon page shows a shot’s takes as cards beside its file, which is where shots are made, and those cards had neither, so a draft made there could not be finalized there. Every test passed, as each tested the viewer.

  • When a take gains an action, add it everywhere takes are shown: the viewer (src/routes/studio/Viewer.svelte, opened from GenerationGrid), the take cards beside a file on the Canon page (src/routes/studio/projects/[id]/canon/+page.svelte) and a shot’s own page (src/routes/studio/ShotTakes.svelte). Write what it does once, in src/routes/studio/take-actions.ts, which the last two share. To find them, search for an action takes already have (Use This Take, Recreate).
  • Make a take for a shot on the Canon page and use the new action there and on the shot’s page, not only in the viewer.
  • Say what a take is now in the same place on every card that shows it: under its facts, before its actions (In use; Plays in place of its draft). On the Canon page the final’s note first came under Use This Take, where the shot’s page had it under the facts.

A label that holds maps, edited as a line of text

The Labels sheet turned each label of a file’s own into one line of text. A label that holds maps (an episode’s cut lists its shots, each with its take and the seconds used; a 3D set lists its things; a camera position holds its camera) showed as “[object Object]”, and saving the sheet would have written that text over the list: every thing in a 3D set, gone.

  • Show a label that holds maps in words, read-only, and leave it out of what the sheet saves (holdsMaps in src/routes/studio/LabelsSheet.svelte).
  • Give a list Studio fills a reserved name (RESERVED_LABELS in src/lib/studio/okf.ts) and a badge of its own words on the file (a cut’s “7 takes”).
  • Keep it on the server too: saveCanonLabels never replaces a label that holds maps, and what made the label writes it whole (saveSetLabels in src/lib/server/studio/canon-edit.ts).
  • Open Labels on a file whose label holds a list of maps, save, and read the file again.

Takes beside a file told apart by nothing

A take’s title is its prompt. On Haft Rang’s route test, SH0040’s 480p draft, its 1080p final and a MAGI-2 take showed on the Canon page as three cards with the same title and nothing more. Nothing said which was the draft, which the final, or what made each. Use This Take could have put the draft in the shot.

  • Under every take’s title, say in one quiet line what made it, a draft or not, its resolution, how long it runs and when (takeFacts in src/lib/studio/take-facts.ts). Do it on the Canon page’s take cards and the shot page’s alike.
  • Read it from the take’s own labels (x-studio.model, .settings, .file; generated.at), which every take file keeps (takeMadeOf).
  • Make a draft and its final for one shot, then open the shot on the Canon page: each card can be told apart without playing it.

A card that leaves out part of what it changes

Changing the 3D set by “move the kiln to the back left” brought a card listing the kiln’s three parts, each moved 2.8 m north. The kiln’s glow light moved with them, but the card said nothing of it: it named the lights only when nothing else changed. A person accepts what a card shows, so a change it leaves out is made unseen.

  • List everything a card’s change does, each kind once (the things, the room, the lights), however small, from the change itself (setChanges in src/lib/studio/set3d.ts); the AI’s summary in words is no list of what changes.
  • Test a change of two kinds at once (a thing and its light): both show on the card.

A panel that changes the open file the page keeps

The Canon page and a shot’s page keep the file they opened while they read their data again, so typing is never lost. The 3D set’s panel changed that file (a card accepted, a build’s take linked) and only read the page’s data again: the take shelf showed the new build, but the file’s labels and its Chosen take stayed as the file was opened, and its version too, so the next save of its text would have been refused as changed meanwhile. Make the Cut and a take’s continuity check filling How it ends did the same.

  • When something beside the open file changes it, have the page open the file again, as Use This Take does: reopenFile on the Canon page and the shot page, passed to the panel (onfilechanged, onchanged, checkTake’s reopen), not invalidateAll alone.
  • Typing not yet saved is safe: the editor keeps it in the browser until it lands.
  • Change the open file from a panel beside it and read its labels without loading the page again: they show the change.

A file opened again that loses the reader’s place

To show a change made beside it (a 3D set’s card accepted, its build’s take linked, Use This Take, a lock), the Canon page let go of the open file and read it again: the editor and every panel in it gave way to a skeleton for a moment, so the column shrank and went back to its top, twice for one accepted card. Each panel drawn again then stayed empty while it read its own data, the 3D set’s for two seconds; a book’s page went back to the line in its address each time it was read again; and an Episode’s file opened again after Make the Cut, which writes only its Cut file, so Play All stopped. The 3D view drew its row of cameras only once its model had loaded, so each new build took the row away for half a second, and everything under it jumped 112 px and back.

  • Open the file again in place: keep it on screen until its new version is there, then draw the editor on that version in the same moment (reopenFile on the Canon page and the shot page).
  • Have a panel drawn again for the same file start from what it showed a moment ago and read again behind it (lastViews in src/routes/studio/last-view.ts), so it keeps its height: the 3D view keeps the row of its cameras, where it looked and the model it drew; and never move the reader when a page is only read again.
  • Open again only the file that changed: when something writes another file, read the page’s data again.
  • Scroll down to a panel beside an open file and change the file from there: the column stays where it was, and nothing in it goes blank.

A code that means nothing to the person

The chat showed story-order codes as they are: MAP_S01E01_SQ010 or MAP_S01E01_SQ010_SC010 in Dabir’s words, the focus line, the story order’s cards and the tool lines, with nothing saying they meant season 1, episode 1, sequence 1, scene 1 (the founders, 2026-11-28: “translate for users what they are and mean”).

  • Show each code with its meaning beside it: codeWithMeaning (src/lib/studio/map-rows.ts) on cards and lines, MAP_S01E01_SQ010 (Season 1, Episode 1, Sequence 1); in Dabir’s words the room’s linkify adds it (withCodeMeanings), unless Dabir already said it in brackets.
  • Say a rung as people count it (codeName): sequences, scenes and shots in tens, SC010 is scene 1.

A name on a card that opens nothing

Dabir’s cards named the story’s places and people by their handles, @caravan_road in a scene’s Place and @merchant, @wild_parrot in Who is in it, as words that went nowhere: to see who @wild_parrot was, the person had to find the file in the Canon themselves (the founders, 2026-11-28: “Make the references links that by clicking on them the user could see them in the viewer”). Once a scene’s labels linked, the rest of each card still did not: its title (A change to @parrot), its summary, a Make’s prompt, the pictures’ names and Dabir’s questions (found live, 2026-11-28).

  • Show every word of a card through HandleText (src/routes/studio/HandleText.svelte) with the room’s handleHref: its title and summary, its labels, lines and fields, a Make’s prompt, the pictures’ names, a question, the room of experts’ question. Each @handle opens its item’s file beside the chat as Dabir’s words do and reads left to right inside Persian; a name the story has no file for stays words.
  • Never inside something that already does something when pressed (a choice, another link): there the words stay as they are.

A code’s meaning inside another bracket or isolate

Once the chat showed each code with its meaning, a new text’s card read “A new text: The gift question (MAP_S01E01_SQ010 (Season 1, Episode 1, Sequence 1))”: its title already put the code in brackets. In Persian, the story order’s cards kept the code and its Persian meaning inside a left-to-right isolate (U+2066), so the meaning sat on the wrong side of the code in the sentence (found live, 2026-11-28).

  • Where a title put a code in brackets, set the code with its meaning apart with · instead: A new text: Hook · MAP_S01E01_SQ010_SC010 (Season 1, Episode 1, Sequence 1, Scene 1). Never brackets inside brackets.
  • In Persian, isolate a slot that may hold a code with its meaning by its first strong letter (U+2068 … U+2069), never left to right: codeWithMeaning already keeps the code itself left to right.

Before shipping a page

How to look

  • Every page at 360px (the narrowest common phone) and at 1280px wide, in Persian and in English.
  • On a phone, load each page and scroll to the end before judging it: sections draw as they come near, and a test that forces them to draw hides what a phone shows.
  • Take screenshots after the page settles: fade-ins and smooth scrolling make a page look empty halfway through.
  • Paste scripts/ui-audit.js into the browser console on every page you changed, in both languages at 360px and 1280px, with real data: it lists anything off the edge, cut off, under 32px, unnamed, printed as [object Object] or NaN, or left in English on a Persian page.
  • Nothing scrolls sideways: run the overflow snippet in the console on each page.
  • pnpm divan:lint finds nothing in the files you changed.
  • Tab through the page: every control shows the copper focus ring; menus, sheets and dialogs close with Esc.
  • After a deploy, check a fix in a tab loaded after it (Cmd+Shift+R): a tab open since before keeps the old code until its next navigation.
  • Sign out and open each app (the site’s account page, the studio, the backoffice) in both languages, at 1280×800 and on a phone: every way in is on its first screen, not a button away, laid out like the app (a slim header with the name at its start and the language at its end, one centred card with its heading inside) with room around it.

Layout, pictures and buttons

  • Each search field has one way to clear it: its own × (type="search"), never a Clear button beside it too; emptying it clears its results.
  • No line anywhere: borders, dividers, underlines, scrollbars.
  • Every picture stays inside its frame, every row of buttons stays on one line, and no button’s label runs outside its capsule: check each card with its tallest and widest picture, in both languages.
  • Every logo is shown in a square frame; only the bilingual lockup is wide (see Logo).
  • Copper only on what can be pressed; the chosen segment stands out; no grid ends with an empty slot; every example reads fully in Persian, digits included.
  • One filled copper button per view: count them with every list item open, and make repeated actions (Send, Save per item, Use this) tinted or secondary.
  • Lists of things people make (projects, folders, shots) with only one in them: the card keeps its size and is not a banner across the page.
  • Open every panel and form the page offers, on a short laptop: a view that fills the screen keeps its whole height (tasks open in a Sheet), and a menu with many links is a drawer on phones, never a bar that scrolls sideways.
  • A page that fills the screen (the board): look at it on a 1360×680 laptop with every mode on (Select Cards with a card picked) and with the longest words, in both languages: the page does not scroll, and each list still shows about two cards.
  • On a 360px phone, open every popover, menu and tooltip next to each edge, in both languages: each keeps a gap from the screen’s side, and a tall one scrolls inside. Set every count to 1 and read it: “1 picture”, never “1 pictures”.
  • Open every sheet on a 360px phone and scroll it from top to bottom: no part lies on top of another.
  • Every link that jumps to a section on the page: click it and wait for the scroll to end; the section’s top sits just under the header.
  • Open a new, empty project (or any page of things that have no pictures yet) on a 360px phone: no card keeps an empty picture slot, and its name and what to do come first.
  • In a list of rows (a status, a count, a person), look down each column: every row puts it in the same place, a row with nothing there keeps the space, and two values on one line have a · between them.
  • Look at the side menu on a short screen (768×600) and on a phone: it holds only where to go; the language and the account (email, Sign Out) are at the end of the header, once.
  • Open every form that edits something saved (a name, a company’s details) without changing it: Save is pressable, and anything dimmed has its reason beside it.
  • Fill every two-column form at its narrowest (a sheet, a phone) with the longest value each field takes: an e-mail address, a website or a link has the full width and shows whole.
  • A page with a bar at its bottom (the studio’s composer, the bar for picked items): make the bar as tall as it gets (a long prompt, several references, its buttons wrapped in Persian on a 360px phone) and scroll to the end: the last row is whole above it, and a short page leaves no empty band under the bar.
  • Open every menu: its groups stand apart by space, every item’s text starts at the same place, and no name is said twice (a button and its menu included).
  • Open every side menu and drawer, on a desktop and on a phone: each level below the top shows a step back and its own name, every section after the first has a label, the page you are on is the one copper row, and Trash and Settings sit at the foot (brand.divanworks.com/side-menus).
  • On a 360px phone, in both languages, run the squeeze check (below) on every page you changed: it comes back empty (no text in a row squeezed beside its buttons), and no explanation ends in an ellipsis.
  • Open each place in an app down to its deepest (a folder in a project’s line), on a desktop and on a phone, in both languages: the top of the page names the whole way there from the company, and the side menu holds only that place’s own pages (a line: its work, pipeline, releases, folders and Trash), never its siblings with its contents opened among them.
  • Open every page that shows a cover or a tile picked from a list of assets with a document, a sound and a video as the newest there: each cover is a picture or a video, never a broken picture.
  • From inside each sheet, press every action that opens another sheet, at a phone width too: the first closes before the second opens, nothing opens behind it, and its first press counts.
  • Open every form with a button inside a field, in both languages: the button starts where the field’s label starts, never stretched or centred across the field.
  • For every feature that replaces an older way of doing something, open the old way’s pages and menu rows: each is gone or leads to the new one, and nothing shows one thing in two places.
  • Open every place people write a text (a Canon file, a rule, a skill): it shows as it reads and they write there, with no Markdown signs to read and no Write and Read to switch between. Type “## ” and “- ” at the start of a line, make a list from the bar too, leave it with Enter twice, wait for Saved, and reload: the heading, the lists and the line after them are still there, and the cursor never jumped. Press Undo after each step (typing, Enter and Backspace across blocks, each button, a paste): each comes back whole. The bar holds every format (text style, marks, lists and checklists, quote, code block, divider, link, a table’s rows and columns, undo and redo), stays in sight while the text scrolls and shows what is on; the cursor is copper and its line lit; no ring or line goes around the text; a link made from its box lands in the text.
  • In every tree of things people keep, add a folder and a text from a folder’s row, and ask the agent to add one: each shows in the tree at once, in the folder asked for.
  • Read each side menu as a newcomer: the step back (a capsule), a section’s label (small, quiet) and a row look like three different things; the step back names where it leads, not the app’s name above it; no label says the title again (Projects › All projects). Then name a project or folder with a whole sentence: it stays on one line, cut short with an ellipsis, and shows whole on hover. Last, look down the end of the rows: every count, arrow and + stands in one line, a folder with things inside too.
  • On every page with a side menu tree, look for where you are shown twice (a path above the title, a menu row leading where the tree does) and for any picker that does not say in its own words what it changes; on a thing’s page, its labels, History and menu share its heading row, and what works on its text sits in the editor’s bar.
  • Fold each app’s side panel away and back with its button and with ⌘\ (Ctrl+\), in both languages: it slides out to the start side as the page widens, Menu shows at the start of the page’s header, and the keyboard lands on the button that undoes it. Reload while it is folded: it never shows for a moment.
  • Open every item from its list (a project from Projects): it opens at its own page, with its own menu beside it (its parts, its settings, Delete), not inside one of its parts. Then find each thing people do to an item (rename, share, delete) in one press from the list or the item’s page.
  • Open each pane beside a view (RoomPanel) on a 360px phone and scroll: it covers the screen from top to bottom with its step back at the top, the view behind it neither scrolls nor takes the keyboard, and Back and Escape close it.
  • Open every line’s side menu and press its step back (‹): each line has the same items (Work, Contents, Pipeline, Releases), and back lands on the project’s menu with its lines, also after the project’s address opens elsewhere.
  • On a 360px phone, in both languages, look at every row where a field sits beside segments or buttons: the field shows its whole placeholder, and what does not fit beside it wraps to a line of its own.
  • Open every view you can zoom (a canvas, a map) with its biggest content, on a 360px phone and a desktop: its first screen can be read, and Show All gives the whole picture in one press.
  • Open every canvas or big diagram as a newcomer, in both languages: each region has a heading that says what it is, a hierarchy reads as a tree in the page’s direction, and you can say what is where without pressing anything.
  • Open the room at 1024 pixels with the panel open, and answer a question whose answers are long: each wraps inside its card and Send stays in view; a map’s titles wrap.
  • Open a part that has a chat about it (a line of a project): the chat is on that part’s own page, with the part’s menu, and nothing about it waits on a page elsewhere.
  • Open a project’s own address: its home lists each line once, saying where it stands (Films its playbook’s step and what is next), and each card opens the line.
  • Make a new project: its menu and its home show the line it started with alone (Films for a sentence that names none), with Add a Line; adding another brings it to both, and a take made in a line keeps that line there.
  • In New Project, write “a picture book about Zal”: the line under it says Books as you write, and Books’ room opens with your words as its first turn; choose Films there first and Films’ room opens instead. Try it in Persian too («کتابی مصور دربارهٔ زال»).
  • Dabir is talked to in one place, a line’s room: on any other page, Ask Dabir on a file opens the room of its line with the file in focus (on a phone the chat in front, the bar naming the file), and no page has a chat of its own.
  • Follow each link to what it names: it lands on the thing itself, never on a page that says where it is and asks for another press.
  • Look at a shot’s first frame before its video is made, and at How it ends once the video is used: the frame shows the moment the shot begins, before what happens in it, and How it ends says how the video ends.
  • Give a take a new action, then look for it everywhere takes are shown: in the viewer, on the take cards beside a shot on the Canon page, and on the shot’s own page.
  • Open a page of things people compare side by side (a shot’s takes) on a 360px phone with three of them: two sit in a row.
  • Make a draft and its final for one shot, then open the shot on the Canon page and on its own page: under each take’s title one line says what made it, a draft or not, its resolution, how long it runs and when, so no two cards read alike.
  • Scroll each page with the pointer over every view in it that zooms (a 3D set, a picture, a map): the page scrolls, and a pinch or Ctrl or ⌘ with the wheel zooms the view.
  • Scroll down to a panel beside an open file and change the file from there (accept a 3D set’s card and wait for its build, Use This Take, lock it): the column stays where it was while the file opens again and the build lands, and nothing in it goes blank or moves.
  • Open Getting started before a first project, after it and once its checklist is done: New Project is at the top each time, the page’s one filled button, and each step done is listed as Done.
  • From inside a project’s line, reach Quick generations in one press: the header’s button on a desktop, the icon in the phone’s bar.
  • Look at Projects, and at the side menu’s Projects, with projects of different lines and no cover: each shows the icon of its first line.
  • On a card that asks something, the button that sends the answer looks different from the answers to pick (filled, with its arrow), and the room’s own Send is gray while the question waits.
  • Press every item of a row’s menu (⋯) once after changing where the row leads: each opens the page it names (a project row’s Canon once led to a 404).
  • In the room itself (not a page made to test it), in Chrome, drag across an answer and the line under it on one of Dabir’s cards, an answer he proposes and a question with its example on one of his forms, and a file’s name, both within each and on past its end, and once from the middle of its first letter: the words select, and the drag never answers, picks, puts the cursor in a field, moves the link or opens it.
  • Open takes shown to choose from (a card of takes in the chat, the take grid) with a wide character sheet and a tall picture: each shows whole, nothing cut at its edges.
  • In the room, make a Make card again with a change, then open its options in the viewer at 360px and on a desktop, in English and in Persian: every round stays on the card, newest first, each in its own shape; Previous and Next, the arrow keys and a swipe go the way the page reads; side by side shows two in a row on the phone, with one zoom; the wheel alone scrolls the page; Use This One saves it and the room says so.
  • Open each kind of thing a view shows in it (a 3D set and a 3D model in the 3D viewer, a picture and a video in a player): each is whole in its box, framed by its own size, and every word names the kind shown.
  • On a take of several pictures (a press of two, a picture split into layers), show the second and press each button: what it makes comes from the picture shown, not the first.

Words and Persian

  • Every message is next to what it is about, in regular weight, and says what to do.
  • Every message that says what to do (a missing key, a refusal, an empty page): the person reading it can do it from where they are, without a developer; a variable name comes second, for whoever can set it.
  • Numbers are in the page’s digits; handles and e-mails read the right way round in Persian.
  • Switch the backoffice to فارسی and look at every page you changed: dates and numbers in Persian, sheets from the end side, arrows turned, no Latin value flipped, no English left.
  • In every box people type in, type Persian that starts with a Latin word (@rostam, #dolly_in, a brand): the line stays right to left, each @ and # stays on the left of its word, and so does the text where it is shown later.
  • Read the tab’s title on every page you add, those outside the menu too; hover each row: a tooltip names an icon button and never gives an instruction.
  • Anything named by its number (@image1, Picture 2, Step 3): take the first one away and check that every place naming the others still points to the right one.
  • Send every form with a field left wrong (an address without @, an empty name), in Persian: the page’s own guidance shows under the field, never the browser’s popup.
  • On a Persian page, open every menu (the … buttons, Change, a lead or a status): its items start at the right, under the button that opened it.
  • With no saved language (a private window) and the browser set to English, open every page our links lead to: it is Persian (English only when the link asks for it), and its language switch changes it in place and is remembered on reload.
  • Open every chat with a model (Dabir, the Dabir Room, any agent): its answers read as text, with headings, lists and bold drawn, and every path of the Canon is a link that opens its file; no Markdown sign (##, -, **, a backtick) shows, also while an answer streams in. Every card that shows a proposal’s text does the same, in Studio and in Studio’s card inside Claude (Show the Text): a table is a table, each of its rows in sight as the text scrolls and no word in it broken in the middle.
  • Open every choice a field offers (a Format’s kind and audience, in Labels): each reads as words in the page’s language, never an id such as micro_series.
  • Read every number a page shows from a field that counts in a unit (a running time, a length, a budget) away from its editor, on Dabir’s cards too: it says what it counts, 600 seconds, never a bare 600.
  • Open every line of a project (Films, Books, Audio, Music, Art, Games, Learn) with nothing made in it yet: each speaks of its own work (a book’s illustrations, music’s tracks), never another line’s shots or scenes, and Films’ words fit a film as well as a series.
  • Read what the room says as it works and what a check waits on, in both languages: files by their titles, folders by their names, never a path, a .md, a slash after a folder or .studio; and no ezafe right after a closing quote mark.
  • Start a project from a long sentence in each language: its first name ends on a word that carries meaning, never on “for” or «و».
  • In an English page, open a card or a list of labels and values that holds Persian values (an item’s fields, a picture’s credit): each value sits on the same side as the English ones, by its label.
  • Open a Persian story with the page in English, and an English one in Persian: make a skill, a type and an expert. Their text is in the story’s language; only the page’s own words follow the page.
  • Open a Persian story with the page in English and read every list of names in a sentence (who is asked, who backed an idea): each name in the list’s order, its commas between them.
  • Open a Persian story with the page in English and convene the room, and send Dabir a message with an English line and a Persian one: the question on the convene card keeps its line breaks, and each line of both reads in its own direction.
  • Open a Persian story with the page in English and read every quote with its place (a card’s departure from the source, the Ideas panel’s sources): the book’s title, then its line, each in its own direction.
  • Open a text’s numbered lines (a book, a script) with the page in the other language: its numbers sit beside its lines, in its own direction and digits, and Persian verse reads as beyts.
  • Open every sheet each way it opens (for something new, for something that is there): its title, lead and button say what it does that time.
  • Open a file with colours and listed labels (a Look’s palette with a dark colour in it, a take’s main colours, a shot’s framing and moves) and a card that proposes them, in English and in Persian: each colour code has its box beside it, the dark one on its tile; each glyph sits at the start of its words; a move’s arrow points the same way in both; and a list reads in the page’s order, no line starting with a comma.
  • Read the Persian of every list of things a page names (a checklist’s items, a line’s words, a template’s headings) beside the glossary: each word is the glossary’s, and its plural is Persian: «ریل‌ها», never «ریلز».
  • Open a card and a file whose label holds sentences with commas in them (a place’s set plan): on the card each sentence has its own line, in Studio and in Claude; on the file’s badge they are joined with semicolons, never run together with commas.
  • Look at a long name in the other script where it is cut short (an English take’s title on a Persian page, a Persian title on an English one, a row of the Canon’s tree): it shows its beginning and ends with an ellipsis, and hovering shows it whole.
  • Read every name shown inside a sentence or a title (New version of “…”, The final of “…”, Upload a new version of “…”): it is whole, or ends on a whole word with an ellipsis.
  • Ask Dabir where a series stands: the map names each episode (Episode 1 and its title), never its code, and says in a sentence what the step now is.
  • Read a few of Dabir’s answers as someone new to film: short sentences, plain words, each film word explained the first time, and an ending with one next step and one question, never a list of what can wait.
  • In the room, read a card, a tool line and Dabir’s words that name a story-order code: each code has its meaning beside it, MAP_S01E01_SQ010 (Season 1, Episode 1, Sequence 1), never in brackets inside brackets; in Persian, the meaning reads after the code.
  • On a Persian page, press into an empty field with a placeholder and one without (a sheet, the room, a question card in Claude, an empty Canon file): the placeholder and the caret start at the right. Type an English word and delete it: the field starts at the right again. A Latin placeholder (https://…) reads whole.
  • In a Persian Canon file, press Enter after a line, after a list item and after a task, and empty a table cell: the caret and the new bullet, number or box start at the right, and every Persian item’s bullet sits at its right, in Safari too. After an English line the new line starts at the left, and an English table reads its columns from the left.

State, filters and tables

  • Open a link that names a place in a long list (?line=, a row, a message): that place is in view and lit, not below the fold.
  • A reload keeps the view: filters, search, sort and page are in the address. Images and charts below the first screen load only when scrolled to.
  • Reload each page that remembers a choice (the composer’s kind, a filter), with a choice that is not the default: the first paint already shows it, with no jump.
  • Filters: change each one and watch the numbers change (not only the address); every choice shows a different list, and a filter whose choices would show the same list is hidden until they differ; reload and the same view returns; every active filter shows as a chip you can remove, with one Reset; on a phone the full set is in a Sheet.
  • Tables: the last column (the action) is visible without sideways scrolling at 1280px; go to page 2, apply a filter, and the table shows its first page; a row you can open opens at 360px too.
  • Numbers shown as steps (sent, opened, tapped): each one is at most the one before it, on real data, and a sentence under them says what they count.
  • Type a word, a comma and a space into every field you add: the space stays. Pictures a later choice leaves out (a start frame) show faded, with the reason beside them.
  • On a live page (the backoffice, the studio), open each sheet with a form and type while the page’s data changes (save something in another tab): what you typed stays.
  • A page that says something is missing (Not connected, no rows): check it against a row you know is there; a query that matches nothing looks the same as nothing being there.
  • Open every sheet and panel that reads something as it opens, twice, with the console open: it fills in once, and no effect_update_depth_exceeded appears.
  • Every filter sits right above the list it filters, in that list’s heading row; press it and watch something in sight change.
  • With the network slowed (DevTools, Fast 4G), tick, add, remove and choose on a live page: each shows at once and stays; nothing waits for the page to load again, and no menu opens empty.
  • Open an inline field or a how-to on one tab or stage, then pick another: it stays with the view it belongs to and does not follow.
  • Press every Create and Join, then look before anything else: the page says what was made or joined (a toast with its name), and a refusal says what to do instead.
  • Open every place a component is reused (a form in a sheet, a page in another state): every word fits that place, the tab title too.
  • Walk every step of a form with steps (sign in, create an account, the code, a new password), in both languages: one heading per step, the same order on each (the terms last), and a problem about the whole form as a quiet note, never red.
  • With the network slowed (DevTools, Slow 4G), press every link, menu row and button on the pages you changed, on a phone too: within a moment what you pressed shows a spinner or breathes, or a spinner shows at the top when a drawer closed on the press. Nothing stays the same until the new page appears.
  • On Slow 4G, reload each page you changed and press its main button and a link before it finishes loading: the press shows at once, the button does its work once the page is ready, and a form never puts what was typed into the address bar.
  • Pick something other than the default on a page whose section shares it (a round in the backoffice’s Episode names), then press each side-menu row of that section, with DevTools’ Network open: the choice stays, and the request for the new page asks only for the page (x-sveltekit-invalidated ends in 1, with 0 for every layout).
  • Open each shared panel (the studio’s viewer) on every page that uses it, press every button, and look without reopening it: each shows its result on this page, and what the panel says is the new state.
  • Make something new on every page that makes things (a text, a folder, an item): what opens next is the one just made, also when its name was taken and it got “Name (2)”.
  • In every form that saves as you type, type halfway into each field that checks what it holds, and stop: nothing says the save failed; the field says what it still needs, and the rest still saves.
  • After every deploy, open each changed page in a browser, not only its server render, and read the console: nothing stops it there (state written while the page is drawn).
  • Every stored id shown to people (a shot’s label, a value in Dabir) is in the words of its own field’s list, and a number stays a number: try a value two lists share (24 as a frame rate).
  • On a live page (the studio, the backoffice), make a change that shows a toast, such as moving a shot on Contents: the page shows the change by the time the toast appears, not seconds later.
  • Accept and discard every kind of card a page offers (Dabir’s proposals, Studio’s card inside Claude, a toast’s Undo), then read each again: its title still says what it was; only its state changed, and nothing around it still asks for a yes. Reload the page (for Studio’s card inside Claude, the chat): a decided card says how it was decided, with no Accept or Discard.
  • Type into every number field what people write (a budget, a running time): 50,000, ۵۰٬۰۰۰, $50,000 and 90 minutes are kept as meant, and a value that is no number says so beside it.
  • Open Projects with a story made a minute ago: each row says where its story stands (its line and stage), and no count of what Studio made for itself, such as its folders.
  • Open a menu or popover beside a text you can type in (a text’s style menu), then press into another field (the room’s chat): the menu closes and the focus stays where you pressed, so what you type goes there.
  • Answer a question in your own words at length (four or five sentences): the field grows to show all of them, and the answer kept after it keeps every word.
  • Take a line through a stage its playbook covers (Films’ Idea), as its lead and not a manager: the gate passes without an override, and nothing it lists as open is something already done.
  • When Dabir says it opened a file, find it open: beside the chat on a wide screen, or behind the card under its words on a phone.
  • Switch the room’s language with a conversation in it: the conversation comes back without the empty room’s words showing first.
  • Convene the room of experts and wait until it is done: no expert’s row still says it is at work.
  • Open a character’s, a place’s and a picture’s file in the room and on the Canon page, in each language: its labels show as named badges, its description and pictures (or its picture, clip or sound) show, no box stands empty, and its History shows each version’s description.
  • Open a line’s work (Films: Work in its menu): its units are the story’s, in the Canon’s order, each named with its path (SQ010 › SC010, SQ010 › SC020 …) and what was made for it, and no empty Scene 1, 2, 3 folders sit in the menu.
  • A list built from the Canon (a line’s units, a step’s files): open it beside the Canon’s own Contents for the same live story; everything there is here, in the same order.
  • Open a story’s Films page and read Supabase’s logs (edge_logs) for those seconds: each table is asked once, not once per load (the Canon’s repo row, its index, the pipeline), and nothing that only another page shows is read.
  • Look at another tab for a moment and come back to a live page with the Network panel open: nothing is read again.
  • Open a project from the Projects list and from the address at the top of a page with the Network panel open: one __data.json, no redirect.
  • In a table whose rows open something, press a link or a menu inside a row with the Network panel open: one request, and only that control answers.
  • Open two lines’ rooms of one story: each shows its own conversation and its own first words, and its bar its own line’s stage (Films’ step, another line’s checklist done so far), as the project’s home says it.
  • Go from one line’s room to another’s by the side menu, and between any two addresses of one page by its links (not by typing them): nothing of the first stays, on screen or in what the page sends.
  • Open every page under a layout whose data the side menu reads through page.data (the Canon: a file, Canvas, History, Earlier chats): the menu draws and the console is quiet.
  • Open every list a model fills (the room’s ideas and their sources, its tool rows) with two items alike: the page still draws, and each shows once.
  • Open the room of a line the story does not use, then the Canon: Rules and skills opens on the story (or on a line in use), and Ask Dabir on a file of the whole story opens a room the story uses.
  • In a room, read each run’s rows: a proposal Studio turned down says so, Studio’s own files say what they are (the /format skill, the Format type), and the bar says “step n of m” only once the Format is set.
  • Open a long room with the Network panel and press Show Earlier: one read of its events a press, no __data.json; accept a card and the story is read again once.
  • Press every button that starts a job (a reading, a generation) while its job cannot start: the card it comes back to says so, in the page’s words, and still offers it again.
  • On every view a person moves (the Canon’s canvas), pan, zoom, hide a kind of line and press a card, then change the data from another tab (accept a card, save a file): the view stays as you left it, and a new card comes in where Studio puts it.
  • Open a form that a file fills (the composer on a shot with a focal length), then one on a file that names less (a shot without one, a camera position): nothing the first file filled stays, each kind of file gets its own start (the Look’s frame), and what you changed by hand for a file stays while it is open.
  • After a press that loads the open file again and starts more work (Use This Take and its continuity check), look for that work’s own trace (its record, its call, its note), not only for the press’s.
  • Open a page fresh and first press what fills a form kept in the browser (Make on a shot): the settings you chose before (sound off, a model) are still there.
  • Press Make on a shot whose used take has a numbered name (“… (2).md”): its note is the shot’s own text, with nothing of the link Studio adds.
  • Press Generate with an account the platform turns away (a key it rejects, no credit left): the generator stays open and says why and what to do, and the take that did not finish shows beside its file with why.
  • Open Labels on a file whose labels hold maps or lists of them (an episode’s Cut file, a 3D set, a camera position with its camera): each shows in words, and saving the sheet leaves it as it was.
  • Open the generator on a picture model (Make on a shot, a shot’s page) and on a video model, in both languages: Generate says about what the press costs, and a model whose price is not known before it answers says no number at all.
  • Press each Play with the browser’s network slowed (Play All, a shot’s own Play in the cut, Play Episode, Listen to this voice): the button spins until the picture moves or the sound starts, and a stop for a take while it plays shows on the picture. A shot’s own Play on a page just opened starts as soon as the takes load, not after the player’s 8 s limit.
  • Press a paid action that makes one thing (Finalize at 1080p), then reload every page that shows it (the Canon page, the shot page, the viewer): the offer is gone, or says it is under way, and pressing again is refused.
  • Open an episode’s cut in Safari or on an iPhone and press Play All once: the sound starts, or the page says the browser held it back and Play With Sound starts it where the picture is; whenever the picture moves, the button says Pause.
  • Start something that runs on by itself (a 3D set’s build, a cut, a take) and watch each place that shows it without loading the page again: each says it is running while it runs, then that it is done, and nothing is left saying it is running.
  • On each card that shows a change, propose a change of two kinds at once (a thing and its light, a label and a file’s text): the card lists both before it is accepted.
  • Make a draft’s final each way Studio offers (Finalize at 1080p, Final with MAGI-2), then read every page that shows the draft: a once-only offer goes only after the press that makes what it offers, and the strip, Play and the cut show the final in the draft’s place.
  • In a panel with several asks (the generator’s Write with AI, Show the Prompt and its chat for changes), make each one come back with nothing new or with a problem, on a phone: each answer shows right next to the ask it answers, never at the top of the panel.
  • Press a button that sets the generator for one take (Final with MAGI-2), then Make on a shot, here and on another page: the generator holds no video Studio put in for that take, and its resolution, length and Draft first are what they were before.
  • On each page that keeps an open file (the Canon page, a shot’s page), change that file from a panel beside it (accept a 3D set’s card, Make the Cut, a continuity check that fills How it ends) and read its labels without loading the page again: they show the change.
  • Switch the workspace from the side menu, on a desktop and in the phone’s drawer: the studio opens Getting started, and the menu stays on its own level with the switcher showing the workspace chosen.
  • Wherever people pick something whose choices are not all ready (a line on Getting started, in New Project and in Add a Line): every choice shows, those not open yet disabled with Soon, and the server refuses them too.
  • Ask Dabir for two or three changes at once and decide only one card: the room says how many still wait and that Dabir goes on once they are decided; change the decided one (Accept Instead or Discard Instead), then decide the last.
  • Open Edit on one of Dabir’s cards, change its text and add a label, accept: the file has your version and its History says changed and accepted.
  • Open Edit on a card of Dabir’s that only sets labels: the sheet shows the labels and no text editor; on a card with a text, the editor starts from that text.
  • Send Dabir a message with a project open: the header’s project total rises with the room’s chat total, without reloading the page.
  • Press Not Sure on one of Dabir’s choice cards: it comes back with a line under each answer saying what it would mean, the recommended one first and no Not Sure on it; on a form, the fields come back filled in with Dabir’s suggestions.
  • With no OpenRouter account connected, choose a model of each route in the composer (OpenRouter, Higgsfield, BytePlus): only an OpenRouter model asks for one, and Generate waits only on the account its own model needs.
  • In the room, open each kind of card Dabir proposes (a text, a plan, an item, a checklist, the story order, a Make) before you say yes: everything it proposes can be changed first, a choice shows only what the picked one offers (a Make’s model and its sizes), and every question takes your own words.
  • In the room, press an @handle anywhere on one of Dabir’s cards (its title, a scene’s Place, Who is in it, a Make’s prompt, a question): its file opens beside the chat, and in Persian it still reads @name; a name the story has no file for stays words.
  • After a change gives something kept and shown again (a card, a take, a saved setting) a field of its own, open one made before the change, in a chat that has one: every control still shows, from what the page already knows (an older Make card still asks what its picture shows).
  • Signed in as someone whose company pays (not @divanworks.com), read the generator’s price, a draft’s Finalize and a Make card in the chat: each says what it costs plus that person’s markup on the model’s platform, as Studio fees has it.
  • In the room, press Make Again on a made Make card and leave the page as it is: the round shows as being made at once, then its pictures and what it cost; then press Use This One on one of them: it is marked Chosen, in its role, at once and after the page is read again.
  • With two platforms connected that sell the same model (BytePlus and Higgsfield), open the model picker: the model is listed once and says whose account makes it, Runs On beside it switches the platform, and opening a shot keeps the platform chosen.

Outside services and the network

  • Settings for an outside service (a model, a network): each is in that service’s own list of what the item takes, a real request carries it, and no two settings share a name in either language.
  • Every list that mixes sources (models from two platforms, accounts of the team and your own): two items never read the same, under a shot or in the list.
  • Read every sign-in as someone new to the place: each way in it shows works for them (no team-only password on a page open to everyone).
  • Pictures and clips that come from another site (Instagram): open one whose link has expired. It shows a quiet tile with Try Again and Open Original, never a broken icon. A picture or video that did not finish (the studio) is a short tile too, never an empty frame its size.
  • After a deploy, press every button that leaves for another site (a sign-in, a payment, Connect an account) on the live site: the other site opens, not a 500 page.
  • Every page you changed, public, backoffice or studio: in the browser’s Network panel no file or response is over 60 KB as sent (the Size column, with the cache off), pictures in tiles included, and a __data.json of type text/sveltekit-data has a content-encoding (none means the zone’s compress_sveltekit_data rule is gone); after a deploy, ask for the biggest from check-host.net’s servers in Iran.
  • Click between the pages you changed with the Network panel open (Fetch/XHR): each click asks only for that page’s own data, not again for the layout around it (in its __data.json address, x-sveltekit-invalidated= has a 0 for each layout), and a click that changes nothing a load reads (a folder, a section of My activity) asks for nothing. The address cannot show a page whose server load asks parent(): the server runs the layouts anyway, so compare the time with a page that does not (pnpm divan:lint flags parent()).
  • Where people’s or a model’s words are drawn as text (a Canon file, Dabir, a prompt), write [x](javascript:alert(1)) and ![x](//example.com/a.png), open it read-only and click the link: nothing runs, and nothing is fetched from elsewhere.
  • Every link that should open an app (YouTube, Instagram, Telegram): tap it on a real iPhone and Android phone, in the phone’s own browser and inside Instagram and Telegram: the app opens, or a page with a button that opens it; never the app’s website.
  • On each subdomain with pages of its own (studio, backoffice, brand, app), press every link to a page of the main site (the sign-in’s Terms and Privacy, the Studio terms in the upload sheet): each opens it on divanworks.com, never a 404 on the subdomain.
  • Every page fed by a scheduled job (missed comments and DMs, the Reymit read, the reply workers, Insights, People, the evening story, Studio’s sweep, the Trends saves) shows when the job last went through; one that keeps stopping, or stops coming, stands out on that page once six of its runs have not gone through (an hour for a 10-minute job), with a way forward, and a job called only when something is due stays quiet while nothing is.
  • Open every page that reads a live stream (the Dabir Room, a model’s answer) and leave it until the stream goes quiet: it keeps working when the server sends an event of its own (event: idle, a ping), and only unnamed events are read as messages.
  • Make a service the page relies on refuse (an AI account out of credit, a day’s cap spent): the page says why in the person’s words and what brings it back, once, and does not try again by itself.
  • In claude.ai, press an answer on a question card from Studio, then Allow once on Claude’s prompt within a few seconds: the answer comes into the chat as Studio’s message and Claude answers it. The card never says it was sent (it says to continue in the chat, with Send Again); a drag across one of its answers selects it and picks nothing, and a form’s answers to pick take your own words too.
  • On each subdomain with pages of its own (backoffice, studio, brand, app, learning), open each new page by its live address (backoffice.divanworks.com/learning, not only /backoffice/learning on local dev) and come back to it from each sign-in or consent it starts: the page itself opens, never a 404 or another path.
Overflow check (browser console)
[...document.querySelectorAll('body *')].filter(el => { const r = el.getBoundingClientRect(); return r.width && (r.right > innerWidth + 1 || r.left < -1) && !el.closest('.overflow-x-auto') })

It lists every element that sticks out past the screen edge; an empty list means the page fits.

Squeeze check (browser console)
[...document.querySelectorAll('body *')].filter(el => { const p = el.parentElement, r = el.getBoundingClientRect(); return p && getComputedStyle(p).flexWrap === 'wrap' && getComputedStyle(el).flexGrow !== '0' && el.innerText?.trim() && r.width < 140 && r.height > 40 })

It lists text in a wrapping row that is squeezed beside its buttons; an empty list means every row has room.

Found an issue? Fix it and record it here

  1. Fix it where you found it, then search the code for the same pattern and fix every other place too.
  2. Record it as a pitfall in its group’s file in src/lib/brand/pitfalls/ (PITFALLS), in English and Persian: what goes wrong and what to do instead. It then shows on brand.divanworks.com/pitfalls, in its Markdown, the MCP server and the agent skill.
  3. If it changes a rule or a component, update that topic too (TOPIC_DOCS and the topic page in src/routes/brand).
  4. If a machine can catch it, add a rule to src/lib/brand/lint.ts with a test in tests/divan-mcp.test.ts; if a person has to look, add a line to PREFLIGHT and PREFLIGHT_FA.
  5. Run pnpm divan:skill, pnpm divan:lint, pnpm check and pnpm test, and ship the record with the fix, in the same change.

Every issue found while building, by a person or an agent, ends up on this page in the same change as its fix. That is how this list grows, and why each mistake happens once.