Skip to content
Back to skills

Write Front End

ASecurity

Use only when writing or reviewing code under ui/ (the React + Vite + Tailwind app). Not needed for CLI, core, store, server or integration work.

  • 4 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 26, 2026
developmentgoreactnodeawstestinggitapi

Works with

  • cli
  • api

Security analysis

A100/100

Scanned December 5, 2026

npx -y skills add leonardourci/othrys --skill write-front-end --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Write Front End?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Write Front End
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/leonardourci-write-front-end-othrys/badge)](https://www.skillsdirectory.com/skills/leonardourci-write-front-end-othrys)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: write-front-end
description: Use only when writing or reviewing code under ui/ (the React + Vite + Tailwind app). Not needed for CLI, core, store, server or integration work.
paths:
  - "ui/**"
---

# Writing the web app

[follow-conventions](../follow-conventions/SKILL.md) applies here too; this skill adds what is specific to `ui/`.

- Build UI from the primitives in `ui/src/shared/ui/`. When one is missing, add it there and extend it; do not inline a one-off control.
- Never use native-styled controls (`<select>`, `<input type="checkbox">` and friends as the browser draws them) or a third-party styled kit such as DaisyUI. Othrys has one look in every browser.
- Design values come from Tailwind's `@theme` in `ui/src/index.css`: colors, spacing, sizes, radii, typography and shadows. Reuse a token before adding one; collapse near-duplicates and record the change in the PR.
- Shared controls own repeated class lists. Screens compose those controls and keep their own class lists short. Add a shared component only for a pattern used in several places.
- ESLint rejects arbitrary utility values and inline styles and sorts classes. Fixed values belong in tokens. Measured geometry and owner-selected sizes use the closed `runtimeStyle` and `applyRuntimeStyle` mechanism described in [Development](../../../docs/development.md#build-and-test); keep the marked chat exception scoped to its rebuild.
- Reuse before building. Search `ui/src/shared/ui/` and the feature folders under `ui/src/` for a component, hook or formatter that already does the job; build a new one only when nothing composes into it.
- Keep components small: one job each, composed from primitives. A screen reads as a list of named pieces, not one block of JSX. A piece used by one file sits above the exported component in that file; a generic piece several features use moves to `ui/src/shared/ui/`. A component that looks generic but carries one feature's logic stays in that feature's folder; when a file comes to hold unrelated concerns, split it along them inside that folder ([follow-conventions](../follow-conventions/SKILL.md#files-and-concerns)).
- Put derived values (labels, classes, formatted text) and compound conditions in named constants above the `return`, not inline in the JSX.
- Read Titan data from the connection store, which receives snapshots and ordered changes over the same resumed WebSocket as live agent activity and chat pages. Don't keep a second copy of either in component state.
- Use the installed React, Vite and Tailwind versions' current APIs, checked against their types or docs, not deprecated props or callbacks.
- Width decides the layout (`max-phone:`); touch or mouse decides the controls. A piece that exists only on a touch screen or only with a mouse lives in its own file, and its call site renders it behind `useTouch()` from `#web-shared/screen.ts`. Never hide it with a class: a component's own display class can override `hidden`.
- Keep accessible names, `aria-label` and `data-*` state attributes stable when you move or rename a component; assistive technology relies on them.
- Chat tokens (commands, skills and task mentions) share one rendering between the composer and sent messages, including their icons, colors and task navigation. Keep surrounding text normal and unknown command or skill names literal.
- Prefer inline creation and editing over modals and dialogs: a new column is created inline at the end of the Titan, card fields edit in place. Reserve overlays for things that truly need them (command palette, confirming a destructive action).

## Written text

Text people write goes through two shared components, so a new screen gets chips, mentions, skills and images by using them:

- `RichText` (`ui/src/shared/ui/rich-text.tsx`) shows agent- or owner-written text: questions, notes, briefs, reports, comments and chat. It renders task, column and skill chips, and every Markdown image, image token and image path as the composer's image chip. Images use the restricted source and viewer. `CollapsibleText` is `RichText` behind "Show more". A one-line summary inside a control uses `markdownText`.
- `ComposerField` (`ui/src/titan/composer-field.tsx`) is the composer for owner-written prose: the Titan composer, comment notes, answers, asks and briefs, and any new one. On its own it is a compact box that grows with its text, without the + menu. It handles @ mentions, / skills and commands, chips, images pasted or dropped at the caret, and copies that keep their references. The app provides its tasks, projects, columns and skills once through `ComposerSourcesProvider`. Titan and worker composers share harness, model and effort controls; mode and Fast stay on the Titan composer. A single-line title stays an `Input`.

```tsx
<RichText text={card.intent} />
<ComposerField label="Your answer" value={text} change={({ text }) => setText(text)} />
```

## Actions show their result immediately

For reversible edits, publish the result through the shared optimistic resource as soon as the owner acts, then confirm it with the server in the background. Allocate a stable attempt/event ID before sending and retain it across uncertain delivery and retry. Key a created item by its client key, map that key to the confirmed ID, and update its fields in place. Confirmation must keep the same React element and DOM node: no refetch-driven remount, collapse or blink.

On a definite refusal, remove the refused preview and show the server's reason. Restore the draft when useful without replacing a newer edit. A message sent in Titan's chat is the exception: the refused message stays in the chat marked Not sent with the server's reason, and Retry sends it again under the same event ID. While delivery is unconfirmed, retain the preview and show “Checking…”; a timeout or disconnect does not mean the edit failed. Use the shared pending state for these outcomes instead of inventing a second local saved state. Destructive or irreversible actions stay confirm-first; preview the result only after explicit confirmation.

Bad: the editor waits for the server before showing the edit.

```ts
await command(edit)
closeEditor()
```

Good: the command publishes its shared preview synchronously, so the editor closes at once, while its durable ID lets confirmation reconcile it in place. The handler awaits the result and restores the draft on a refusal.

```ts
const saving = command({
  name: 'task',
  args: ['rename', task.key, '--title', title, '--event-id', crypto.randomUUID()],
})
closeEditor()

try {
  await saving
} catch (error) {
  restoreDraft({ title, error })
}
```

Run `pnpm verify` and follow [Testing](../../../docs/testing.md) for behavior tests.

## Pull requests with visible changes

Capture each changed view in an isolated headless browser at desktop and phone widths in light and dark themes. Show before and after screenshots side by side in a `Before | After` table at a reduced width (`<img src="..." width="360">`). Add a short GIF when motion or interaction is the point. Host media on the `pr-media` branch under `pr-<number>/` and link it as `https://github.com/leonardourci/othrys/blob/pr-media/pr-<number>/<file>?raw=true`.

Loaded Titans, project columns, cards, chat rows and task updates stay mounted during scrolling. Project columns, cards and chat rows render at their real heights, including off-screen rows. Task Activity updates use `content-visibility: auto` to skip off-screen painting. The shared `Chat` component owns chat scroll position. Suggestion lists (`SuggestionPicker` for `@`, `/` and similar menus) mount rows as scrolling or keyboard selection reaches them.

Manage scroll bars in `ui/src/index.css`. They are hidden across the app except on chat transcripts, where the thumb appears on hover or while scrolling.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.