| 1 | # UI |
| 2 | |
| 3 | ## Philosophy |
| 4 | |
| 5 | A developer tool people use daily to browse code and manage repos. Optimise for: |
| 6 | |
| 7 | 1. **Speed-first** — minimise clicks, maximise information density |
| 8 | 2. **Scannable** — find what you need in under a second |
| 9 | 3. **Quiet confidence** — premium without flashy; the UI should disappear |
| 10 | 4. **Code-centric** — code is the hero, everything else supports it |
| 11 | |
| 12 | |
| 13 | |
| 14 | | Readable density | Compact without cramped. Maximise info per viewport. | |
| 15 | | Clear hierarchy | Strong contrast between labels, content, and muted elements | |
| 16 | | Functional spacing | 8px on items, 12–16px on sections. No wasted space. | |
| 17 | | Keyboard-first | Every action reachable without a mouse | |
| 18 | | Dark-mode primary | Developers live in dark mode. Light mode is supported, secondary. | |
| 19 | |
| 20 | **Do:** small type (`text-xs` / `text-sm` for most UI), small buttons, monospace for |
| 21 | paths, SHAs, and branch names, opacity modifiers for text hierarchy, tight spacing. |
| 22 | |
| 23 | **Don't:** large type outside page titles, shadows in dark mode (use borders), bright |
| 24 | backgrounds, hover animations that move or resize things. |
| 25 | |
| 26 | ## Where the portfolio framing bites |
| 27 | |
| 28 | Steid is portfolio-first, not a Gitea clone. The profile page is the product — repos |
| 29 | are one kind of thing on it, alongside writing and projects. Any layout inherited from |
| 30 | a GitHub-shaped forge needs checking against that before it's copied. |
| 31 | |
| 32 | ## The shell |
| 33 | |
| 34 | Settled 2026-09-05, when app-shell navigation (PostHog/GitLab-style sidebar) was |
| 35 | considered and rejected. |
| 36 | |
| 37 | **A slim top bar plus contextual tabs, not an app shell.** The reasoning: |
| 38 | |
| 39 | - Sidebar shells optimise for the logged-in daily user hopping between many top-level |
| 40 | destinations. Steid's first audience is the opposite — an anonymous reader of |
| 41 | someone's site who will never sign in — and rail chrome reads as "self-hosted admin |
| 42 | tool", which is the exact wrong first impression for a portfolio. The managed |
| 43 | offering strengthens this: every paying customer's audience is that visitor. |
| 44 | - Steid has four-ish global destinations; a sidebar would be mostly empty rail, |
| 45 | advertising incompleteness the same way the old stacked-section profile did. |
| 46 | - A shell-for-owners / site-for-visitors split is the two-design-languages trap again. |
| 47 | One vibe. |
| 48 | |
| 49 | What ships instead: |
| 50 | |
| 51 | - **The top bar**: one ~44px row, wordmark on the left → `/`, sign-in state on the |
| 52 | right ("Sign in", or `@handle` / Settings / Sign out). It never grows navigation; |
| 53 | that belongs to the thing being navigated — the profile's tab bar, the repository's. |
| 54 | - **Per-page widths.** The layout imposes none; pages wrap themselves in `narrow` |
| 55 | (48rem — prose-shaped: profile, forms, settings, writing) or `wide` (80rem — |
| 56 | code-shaped: tree, blob, log). Both live in `layout.rs`. A page that forgets one |
| 57 | renders full-bleed, which is visible, not silently wrong. |
| 58 | - Where a sidebar does earn its place is *within* a wide page — a file tree beside a |
| 59 | blob, a settings-section nav — as local structure, not global chrome. |
| 60 | |
| 61 | Open: **the wordmark says "steid"**, but on someone's own domain, portfolio-first |
| 62 | argues the top-left identity slot belongs to the owner, not to Steid. Undecided; |
| 63 | becomes decidable when multi-user lands and "the owner" needs a rule anyway. |
| 64 | |
| 65 | ## The profile page |
| 66 | |
| 67 | Settled 2026-08-29, after looking at the built page with real data rather than |
| 68 | imagining it. Three sections of equal weight — Repositories, Writing, Projects — two of |
| 69 | them empty boxes, repositories sorted alphabetically so `dotfiles` outranked `steid`. |
| 70 | A third of the page was content and two thirds advertised incompleteness. |
| 71 | |
| 72 | **Flat, app-style navigation. No cards, no boxes.** |
| 73 | |
| 74 | ``` |
| 75 | James Gill |
| 76 | @jamesgill |
| 77 | <bio> |
| 78 | <links> |
| 79 | ───────────────────────────────────────────── |
| 80 | Overview Repositories 3 Writing |
| 81 | ───────────────────────────────────────────── |
| 82 | CURRENTLY BUILDING |
| 83 | steid Rust |
| 84 | A self-hostable gitforge where the profile is the product. |
| 85 | 421 tests · updated 2 hours ago |
| 86 | |
| 87 | REPOSITORIES All 3 → |
| 88 | ────────────────────────────────────────── |
| 89 | topcoat-notes 3d |
| 90 | Notes on building with Topcoat 0.5. |
| 91 | ────────────────────────────────────────── |
| 92 | dotfiles 2w |
| 93 | ``` |
| 94 | |
| 95 | - **A tab bar, not stacked sections.** Empty sections stop being visible failures and |
| 96 | become destinations that simply have nothing in them yet. It is also what makes |
| 97 | Writing shippable without redesigning the page around it. |
| 98 | - **Tabs are links.** No JavaScript, and each tab is a real URL that can be shared. |
| 99 | - **One lead item with genuine typographic weight**, then a compact list. This is the |
| 100 | editorial layer portfolio-first requires: without it the page has no opinion about |
| 101 | what matters, and ordering alone cannot carry that. |
| 102 | - **Hairlines and hover states, never bordered containers.** The row is the unit. |
| 103 | - **Recency, not alphabetical.** Alphabetical is a filing rule; a portfolio needs an |
| 104 | editorial one. |
| 105 | - **Sections with nothing in them are hidden from visitors** and shown to the owner as |
| 106 | an affordance. |
| 107 | |
| 108 | ### One vibe. Hierarchy without scale. |
| 109 | |
| 110 | The first version of this design gave the lead item large type and justified it by |
| 111 | splitting the product into a "portfolio surface" and a "tool surface" with different |
| 112 | rules. **That was wrong and is not what ships.** Two design languages in one product is |
| 113 | how a product stops feeling like one thing, and it contradicted this file's own |
| 114 | philosophy — quiet confidence, the UI disappears, small type throughout. |
| 115 | |
| 116 | Nothing exceeds 14px except the page title. The lead item is distinguished by |
| 117 | **everything except size**: |
| 118 | |
| 119 | |
| 120 | |
| 121 | | Eyebrow label | yes | no | |
| 122 | | Weight | 600 | 500 | |
| 123 | | Description | full width, roomy | compact | |
| 124 | | Space around it | generous | tight | |
| 125 | | Separator | hairline below | none | |
| 126 | |
| 127 | The cost, stated plainly: the distinction is **subtle**. One weight step is not much, |
| 128 | and the eyebrow and whitespace carry most of it. That is the right trade for a developer |
| 129 | tool — but it means the copy in the eyebrow is load-bearing, because it is the clearest |
| 130 | signal that this item is different. |
| 131 | |
| 132 | **The eyebrow reads "Currently building"**, chosen over a neutral "Featured". It says |
| 133 | something rather than labelling something, which is what a portfolio built in public |
| 134 | wants. The known cost: it is a claim about the present, so pinning a finished project |
| 135 | makes the page lie. The answer if that becomes a problem is a per-pin label, not a |
| 136 | blander default. |
| 137 | |
| 138 | The general rule this sets: **hierarchy comes from weight, colour and space. Reach for |
| 139 | size last, and outside a page title, probably not at all.** |
| 140 | |
| 141 | ### The front door |
| 142 | |
| 143 | Steid is meant to be someone's site, reached at their own domain — `jpgill.dev`, not |
| 144 | `git.jpgill.dev`, because a `git.` subdomain announces a Gitea clone and this is |
| 145 | portfolio-first. That makes the root a signpost rather than a page: unclaimed it sends |
| 146 | you to setup, and otherwise it forwards to a profile — your own when signed in, **the |
| 147 | owner's when not**. |
| 148 | |
| 149 | The last case is the one that matters. A stranger arriving at the apex came for the |
| 150 | profile and will never sign in, so a sign-in prompt there is the front door answering the |
| 151 | wrong question. It only applies when the owner is unambiguous: with more than one user |
| 152 | "the owner" has no answer, so the root falls back to a generic landing rather than |
| 153 | electing someone by storage order. |
| 154 | |
| 155 | ### What it needs that does not exist yet |
| 156 | |
| 157 | - **`updated_at` on a repository.** The design promises recency and nothing stores it. |
| 158 | Asking git costs one fork per repository — a twelve-repo profile would be ~150ms of |
| 159 | `execve` before rendering. So it is a column, touched when a push is authorized. |
| 160 | Slightly wrong if a push then fails; the alternative is wrong more expensively. |
| 161 | - **A `/{handle}/repos` index.** The Repositories tab needs a destination; only |
| 162 | `/{handle}/repos/{name}` exists. |
| 163 | - **A way to choose the lead.** A `pinned` flag on the repository, set from the settings |
| 164 | page that now exists. No pin, no lead section — automatic "most recent" would put a |
| 165 | dotfiles tweak at the top of a portfolio. |
| 166 | |
| 167 | ### Mocking is harder than it looks here |
| 168 | |
| 169 | **Tailwind classes the app does not already use are not in the built stylesheet.** |
| 170 | `build.rs` scans the real sources, so a mockup written against the served CSS silently |
| 171 | loses any new utility — `gap-7` and `tracking-widest` collapsed a nav into |
| 172 | `OverviewRepositories3WritingProjects` before this was understood. Iterate either in the |
| 173 | app itself or, for throwaway exploration, in plain CSS against the theme's custom |
| 174 | properties (`--background`, `--foreground`, `--muted-foreground`, `--border`, `--surface`). |
| 175 | |
| 176 | Dark mode is a `.dark` class on an ancestor, not `prefers-color-scheme`; a mockup |
| 177 | without it renders light. |
| 178 | |
| 179 | ## Stack |
| 180 | |
| 181 | Settled in [0005](decisions/0005-tailwind-and-copied-components.md). |
| 182 | |
| 183 | |
| 184 | |
| 185 | | Styling | Tailwind via Topcoat's build script — no Node | |
| 186 | | Theme | `styles.css` at the package root: design tokens, dark-first | |
| 187 | | Components | `topcoat ui add` for primitives, hand-written for Steid's own | |
| 188 | | Mono | IBM Plex Mono, for paths, hashes, branches, handles | |
| 189 | |
| 190 | ### Tokens |
| 191 | |
| 192 | Defined in `styles.css` on `:root` (light) and `.dark` (dark, the default): |
| 193 | |
| 194 | ``` |
| 195 | background surface foreground muted-foreground |
| 196 | primary primary-foreground |
| 197 | success success-foreground confirmations, git additions |
| 198 | warning warning-foreground caution, git modifications |
| 199 | destructive destructive-foreground errors, git deletions |
| 200 | border ring shadow-xs shadow-sm |
| 201 | ``` |
| 202 | |
| 203 | `surface`, `success` and `warning` are Steid's additions to Topcoat's `neutral` theme; |
| 204 | the rest were retuned to the palette below. |
| 205 | |
| 206 | **Components reference tokens, never raw colours.** A hardcoded colour will not follow |
| 207 | a palette change and will not adapt to the colour scheme. This is the convention to |
| 208 | enforce in review. |
| 209 | |
| 210 | ### Working on it |
| 211 | |
| 212 | ```bash |
| 213 | topcoat dev |
| 214 | topcoat asset bundle |
| 215 | topcoat ui list |
| 216 | topcoat ui add <name> |
| 217 | ``` |
| 218 | |
| 219 | `components.toml` is the record of what is installed; don't duplicate that list here. |
| 220 | |
| 221 | **A registry component can need more than a copy.** `select` draws its chevron with an |
| 222 | Iconify icon, which needs the `icon-iconify` feature on `topcoat` *and* the icon set |
| 223 | staged in `build.rs`: |
| 224 | |
| 225 | ```rust |
| 226 | topcoat::icon::iconify::BuildConfig::new().icon_set("feather").stage().unwrap(); |
| 227 | ``` |
| 228 | |
| 229 | The build fails with a message naming the missing set, so it is discoverable — but the |
| 230 | build.rs edit is easy not to expect from a command that only advertises copying a file. |
| 231 | Icons are embedded at build time; nothing is fetched at runtime. |
| 232 | |
| 233 | `topcoat ui add` also rewrites the module list in `src/components.rs` by appending, so |
| 234 | re-alphabetise it afterwards. |
| 235 | |
| 236 | ## Prior art |
| 237 | |
| 238 | Attempt #1 (`steid-backup/AGENTS/UI.md`) has a complete 643-line design system — |
| 239 | OKLCH light/dark palettes with concrete token values, a type scale, spacing scale, and |
| 240 | component markup for sidebar, file tree, commit bar, breadcrumbs, badges, empty |
| 241 | states. It was written for Tailwind + DaisyUI. |
| 242 | |
| 243 | Its palette has been mined already — the dark-first OKLCH values at hue 260 are what |
| 244 | `styles.css` was retuned to. Its component markup has not, and comes with two caveats: |
| 245 | it specifies DaisyUI, which is a separate choice from Tailwind and not bundled by |
| 246 | Topcoat; and it was written for a GitHub-shaped forge rather than a portfolio-first |
| 247 | one. |
| 248 | |
| 249 | It is also, on its own, longer than every other doc in this directory combined — for |
| 250 | an app that had about nine pages. Take the palette and the principles. Don't |
| 251 | re-specify components before there are components. |