ReviewOS

also looking at this

loghqorg/loghq

Deploy: uniform auth session model (main → production)

#7
Merged glennmichael123 wants to merge main into production
282 files +3028 -64856

Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.

.claude/skills/stacks-crosswind/SKILL.mdmodified+2-2
Changes to .claude/skills/stacks-crosswind/SKILL.md
@@ -16,7 +16,7 @@ For taste-level guidance on *which* utilities to reach for (layout variance, spa
1616
1717## Key Paths
1818- Package: `node_modules/@cwcss/crosswind/`
19- UI config: `config/stx.ts` (Crosswind options referencing Crosswind)
19- UI config: `config/ui.ts` (Crosswind options referencing Crosswind)
2020- Default styles: `storage/framework/defaults/styles/`
2121- Output: `storage/framework/assets/crosswind.css`
2222
@@ -181,7 +181,7 @@ interface ParsedClass {
181181
182182## Gotchas
183183- **Not Tailwind** — Crosswind is a separate implementation with Tailwind-compatible syntax
184- **Stacks uses Crosswind config** — `config/stx.ts` defines Crosswind options which feed Crosswind
184- **Stacks uses Crosswind config** — `config/ui.ts` defines Crosswind options which feed Crosswind
185185- **Output goes to `storage/framework/assets/crosswind.css`** — not a typical `dist/` directory
186186- **Bun plugin available** — can be used as a Bun build plugin for automatic CSS generation
187187- **Attributify mode** — optional mode where utilities can be written as HTML attributes instead of classes
.claude/skills/stacks-dashboard/SKILL.mdmodified+1-1
Changes to .claude/skills/stacks-dashboard/SKILL.md
@@ -17,7 +17,7 @@ The Stacks admin dashboard provides a full-featured admin panel with 136+ routes
1717- Dashboard layouts: `storage/framework/defaults/layouts/dashboard/`
1818- Dashboard router types: `storage/framework/types/dashboard-router.d.ts` (136+ routes)
1919- Dashboard actions: `storage/framework/defaults/actions/Dashboard/`
20- Configuration: `config/stx.ts`
20- Configuration: `config/ui.ts`
2121
2222## Dashboard Sections
2323
.claude/skills/stacks-design-brutalist/SKILL.mdmodified+1-1
Changes to .claude/skills/stacks-design-brutalist/SKILL.md
@@ -53,7 +53,7 @@ Typography is the primary structural and decorative infrastructure. Imagery is s
5353## 4. Color System
5454The color architecture is uncompromising. Gradients, soft drop shadows, and modern translucency are strictly prohibited. Colors simulate physical media or primitive emissive displays.
5555
56**CRITICAL: Choose ONE substrate palette per project and use it consistently. Never mix light and dark substrates within the same interface.** Expose these as Crosswind theme tokens in `config/stx.ts`.
56**CRITICAL: Choose ONE substrate palette per project and use it consistently. Never mix light and dark substrates within the same interface.** Expose these as Crosswind theme tokens in `config/ui.ts`.
5757
5858### If Swiss Industrial Print (Light):
5959- **Background:** `#F4F4F0` or `#EAE8E3` (matte, unbleached documentation paper).
.claude/skills/stacks-design-minimalist/SKILL.mdmodified+1-1
Changes to .claude/skills/stacks-design-minimalist/SKILL.md
@@ -43,7 +43,7 @@ Color is a scarce resource, used only for semantic meaning or subtle accents.
4343 - Pale Green: `#EDF3EC` (Text: `#346538`)
4444 - Pale Yellow: `#FBF3DB` (Text: `#956400`)
4545
46Expose these as Crosswind theme tokens or CSS custom properties in `config/stx.ts` so dark mode (`dark:` + `useColorMode()` / `useDark()`) stays consistent.
46Expose these as Crosswind theme tokens or CSS custom properties in `config/ui.ts` so dark mode (`dark:` + `useColorMode()` / `useDark()`) stays consistent.
4747
4848## 5. Component Specifications
4949- Bento Box Feature Grids:
.claude/skills/stacks-development/SKILL.mdmodified+2-2
Changes to .claude/skills/stacks-development/SKILL.md
@@ -17,7 +17,7 @@ allowed-tools: Read Edit Write Bash Grep Glob
1717- Buddy CLI dev commands: `storage/framework/core/buddy/src/commands/dev.ts`
1818- Preloader: `storage/framework/defaults/resources/plugins/preloader.ts`
1919- Port config: `config/ports.ts`
20- STX config: `config/stx.ts`
20- STX config: `config/ui.ts`
2121- IDE defaults: `storage/framework/defaults/ide/`
2222- SSL setup: `storage/framework/core/actions/src/setup/ssl.ts`
2323- Bun config: `bunfig.toml`
@@ -268,7 +268,7 @@ Default configurations provided at `storage/framework/defaults/ide/`:
268268- `.env` file presence (warn if missing, not a failure)
269269- `APP_KEY` is set (warn if not, suggests `buddy key:generate`)
270270
271## STX Configuration (config/stx.ts)
271## STX Configuration (config/ui.ts)
272272
273273```typescript
274274{
.claude/skills/stacks-image-to-code/SKILL.mdmodified+1-1
Changes to .claude/skills/stacks-image-to-code/SKILL.md
@@ -329,7 +329,7 @@ Use standard `<img>` with explicit `width`/`height` to reserve space and avoid C
329329
330330### 12.H Dark mode
331331
332Crosswind `dark:` variant (`bg-white dark:bg-neutral-900`). Runtime toggle via `useColorMode()` / `useDark()`. Config in `config/stx.ts`.
332Crosswind `dark:` variant (`bg-white dark:bg-neutral-900`). Runtime toggle via `useColorMode()` / `useDark()`. Config in `config/ui.ts`.
333333
334334### 12.I Motion: CSS + composables (no GSAP / Motion / Framer)
335335
.claude/skills/stacks-redesign/SKILL.mdmodified+1-1
Changes to .claude/skills/stacks-redesign/SKILL.md
@@ -14,7 +14,7 @@ allowed-tools: Read Edit Write Bash Grep Glob
1414
1515When applied to an existing Stacks project, follow this sequence:
1616
171. **Scan** - Read the codebase. Confirm the stack is stx + Crosswind + composables. Locate `resources/views/*.stx`, `resources/components/*.stx`, `resources/layouts/*.stx`, `config/stx.ts`, `config/crosswind.ts`, and the `fonts` config. Note current design patterns.
171. **Scan** - Read the codebase. Confirm the stack is stx + Crosswind + composables. Locate `resources/views/*.stx`, `resources/components/*.stx`, `resources/layouts/*.stx`, `config/ui.ts`, `config/crosswind.ts`, and the `fonts` config. Note current design patterns.
18182. **Diagnose** - Run through the audit below. List every generic pattern, weak point, and missing state you find.
19193. **Fix** - Apply targeted upgrades working with the existing stx + Crosswind stack. Do not rewrite from scratch and do not migrate frameworks. Improve what is there.
2020
.claude/skills/stacks-stx/SKILL.mdmodified+2-2
Changes to .claude/skills/stacks-stx/SKILL.md
@@ -15,7 +15,7 @@ STX is the full-stack templating and component framework for Stacks. It handles
1515When the task is how a page should *look* (not just how stx renders), pair this skill with the design-taste family: `stacks-design-taste` (flagship), the aesthetic presets `stacks-design-soft` / `stacks-design-minimalist` / `stacks-design-brutalist`, `stacks-redesign`, `stacks-design-output`, and the image-first `stacks-image-to-code` / `stacks-imagegen-web` / `stacks-imagegen-mobile` / `stacks-brandkit`. They translate premium design rules into stx + Crosswind + composables.
1616
1717## Key Paths
18- STX config: `config/stx.ts`
18- STX config: `config/ui.ts`
1919- STX plugin: `bun-plugin-stx` (loaded via bunfig.toml)
2020- STX state: `.stx/`
2121- Components: `resources/components/`
@@ -58,7 +58,7 @@ function increment() {
5858</style>
5959```
6060
61## Configuration (config/stx.ts)
61## Configuration (config/ui.ts)
6262
6363```typescript
6464import type { StxOptions } from '@stacksjs/stx'
.claude/skills/stacks-ui/SKILL.mdmodified+4-4
Changes to .claude/skills/stacks-ui/SKILL.md
@@ -19,8 +19,8 @@ For premium, non-templated UI (layout, typography, color, motion) built on stx + renamed throughout
1919## Key Paths
2020- Core package: `storage/framework/core/ui/src/`
2121- Components: `storage/framework/core/ui/src/components/`
22- UI config: `config/stx.ts` (Crosswind)
23- STX config: `config/stx.ts`
22- UI config: `config/ui.ts` (Crosswind)
23- STX config: `config/ui.ts`
2424- STX engine: `node_modules/@stacksjs/stx/`
2525- Crosswind: `node_modules/@cwcss/crosswind/`
2626- Component types: `storage/framework/types/components.d.ts`
@@ -196,7 +196,7 @@ defineStore('theme', () => {
196196}, { persist: true })
197197```
198198
199## Crosswind Configuration (config/stx.ts)
199## Crosswind Configuration (config/ui.ts)
200200
201201```typescript
202202export default {
@@ -210,7 +210,7 @@ export default {
210210} satisfies CrosswindOptions
211211```
212212
213## STX Configuration (config/stx.ts)
213## STX Configuration (config/ui.ts)
214214
215215```typescript
216216export default {
config/stx.ts config/ui.tsrenamed+0-0

Renamed from config/stx.ts. The contents are unchanged.

package.jsonmodified+1-1
Changes to package.json
@@ -78,7 +78,7 @@
7878 "bun-query-builder": "^0.2.57",
7979 "stacks": "^0.74.0"
8080 },
81 "//overrides": "stx is not a direct dependency \u2014 the only reference is a type import in config/stx.ts. But it arrives through nine transitive paths, and bun-plugin-stx asks for a range so loose (^0.2.72) that dropping the old direct pin let the hoisted copy fall to 0.2.176 while the framework packages sat on 0.2.231. bun-plugin-stx resolves to the HOISTED copy, so that is the version that renders every .stx file. Every constraint in the tree (^0.2.230, 0.2.231, ^0.2.82, ^0.2.72) is satisfied by 0.2.231, so pinning it here collapses the tree to one copy without re-declaring a dependency this app does not have. Re-check after a stacks bump.",
81 "//overrides": "stx is not a direct dependency \u2014 the only reference is a type import in config/ui.ts. But it arrives through nine transitive paths, and bun-plugin-stx asks for a range so loose (^0.2.72) that dropping the old direct pin let the hoisted copy fall to 0.2.176 while the framework packages sat on 0.2.231. bun-plugin-stx resolves to the HOISTED copy, so that is the version that renders every .stx file. Every constraint in the tree (^0.2.230, 0.2.231, ^0.2.82, ^0.2.72) is satisfied by 0.2.231, so pinning it here collapses the tree to one copy without re-declaring a dependency this app does not have. Re-check after a stacks bump.",
8282 "overrides": {
8383 "@stacksjs/stx": "0.2.231"
8484 },
public/app-chrome.cssmodified+1-1
Changes to public/app-chrome.css
@@ -14,7 +14,7 @@
1414 * substitute, and it is also the router-safe home — the SPA router destroys
1515 * every <head> style that is not the Crosswind tag, but leaves <link>s alone.
1616 *
17 * Linked once from config/stx.ts `app.head.link`, after /tokens.css so it can
17 * Linked once from config/ui.ts `app.head.link`, after /tokens.css so it can
1818 * read the palette, before the Crosswind sheet so utilities still win a
1919 * specificity tie against anything here.
2020 *
public/tokens.cssmodified+2-2
Changes to public/tokens.css
@@ -1,6 +1,6 @@
11/* loghq design tokens — the single source for the app surface.
22 *
3 * Linked once from config/stx.ts `app.head.link`, so every page gets it without
3 * Linked once from config/ui.ts `app.head.link`, so every page gets it without
44 * repeating it. Ten app views used to declare their own byte-similar copy of
55 * this block: 90 custom-property declarations in four subtly diverging
66 * variants, which is how the dashboard's `--mono` stack ended up one entry
@@ -238,7 +238,7 @@ body {
238238 * before first paint.
239239 *
240240 * stx's color-mode boot script sets data-theme on the root above every
241 * stylesheet (config/stx.ts app.colorMode), and useColorMode keeps it current
241 * stylesheet (config/ui.ts app.colorMode), and useColorMode keeps it current
242242 * afterwards, so the correct icon paints immediately and the mirror signal the
243243 * binding needed is gone from all three pages. */
244244:root[data-theme='light'] .theme-btn .ic-sun {
resources/layouts/default.stxmodifiedrenamed throughout+2-2
Changes to resources/layouts/default.stx
@@ -1,14 +1,14 @@
11{{-- App and auth chrome. Layout group 'default'.
22
33 A FRAGMENT, not a document. stx synthesises the doctype, the html/head/body
4 elements and their contents from config/stx.ts `app.head` merged with each
4 elements and their contents from config/ui.ts `app.head` merged with each
55 page's useSeoMeta() (process.js:205-233 → document-shell.js). Writing a
66 document here would make hasDocumentShell() true (document-shell.js:64),
77 turn ensureDocumentShell() into a no-op, and silently drop every page's
88 title, description and og tags on the floor.
99
1010 This layout owns the single router container, and that is load-bearing
11 rather than cosmetic. config/stx.ts pins `router.container: 'main'`;
11 rather than cosmetic. config/ui.ts pins `router.container: 'main'`;
1212 getContainer() (stx-router client.js:193-195) returns the FIRST match, and
1313 when it returns null shouldIntercept bails at client.js:796 and swap()
1414 falls back to a full location assignment at client.js:395 — every link
resources/layouts/marketing.stxmodified+2-2
Changes to resources/layouts/marketing.stx
@@ -57,7 +57,7 @@
5757 lives here instead. --}}
5858
5959@head
60{{-- Marketing-only stylesheet, deliberately NOT in config/stx.ts app.head: app
60{{-- Marketing-only stylesheet, deliberately NOT in config/ui.ts app.head: app
6161 pages never linked it and define their own conflicting .btn and .panel
6262 rules. The shared fonts, charset, viewport and favicon DO live in app.head —
6363 they are genuinely site-wide, and injectConfigHeadTags dedupes by exact href
@@ -77,7 +77,7 @@
7777
7878@include('SiteNav')
7979
80{{-- The single router container (config/stx.ts router.container). Pages must not
80{{-- The single router container (config/ui.ts router.container). Pages must not
8181 declare their own: the server slices the fragment between the first opening
8282 tag and the last closing one, so a second one makes the span ambiguous. --}}
8383<main>
resources/views/dashboard.stxmodified+2-2
Changes to resources/views/dashboard.stx
@@ -505,7 +505,7 @@ const pro = state(false)
505505
506506// `theme` mirrors the root element's data-theme — the root is owned by no
507507// component, and stx's color-mode boot script — emitted from app.colorMode in
508// config/stx.ts — sets it before hydration to avoid a flash.
508// config/ui.ts — sets it before hydration to avoid a flash.
509509function toggleTheme(): void {
510510 // The theme store owns persistence, the prefers-color-scheme listener, the
511511 // cross-tab storage listener and the dark-class write. This used to do the
@@ -625,7 +625,7 @@ onMount(() => {
625625@extends('layouts/default')
626626
627627@section('content')
628{{-- No hand-written theme guard here. config/stx.ts declares app.colorMode, and
628{{-- No hand-written theme guard here. config/ui.ts declares app.colorMode, and
629629 stx emits the pre-paint boot script from that one declaration — first inside
630630 <head>, above every stylesheet, reading the same loghq_theme key and setting
631631 the same data-theme attribute this script used to set by hand. The generated
resources/views/projects/index.stxmodified+2-2
Changes to resources/views/projects/index.stx
@@ -79,7 +79,7 @@ useSeoMeta({
7979//
8080// The theme button holds no state at all now. Its icon swap is a CSS rule keyed
8181// off the root element's data-theme (public/tokens.css), which stx's color-mode
82// boot script sets before first paint from app.colorMode in config/stx.ts. The
82// boot script sets before first paint from app.colorMode in config/ui.ts. The
8383// mirror signal this file used to keep — and the :data-t binding it fed — meant
8484// neither icon matched until hydration, so the button rendered empty.
8585function toggleTheme(): void {
@@ -103,7 +103,7 @@ function logout(): void {
103103@extends('layouts/default')
104104
105105@section('content')
106{{-- No hand-written theme guard here. config/stx.ts declares app.colorMode, and
106{{-- No hand-written theme guard here. config/ui.ts declares app.colorMode, and
107107 stx emits the pre-paint boot script from that one declaration — first inside
108108 <head>, above every stylesheet, reading the same loghq_theme key and setting
109109 the same data-theme attribute this script used to set by hand. The generated
resources/views/settings.stxmodified+1-1
Changes to resources/views/settings.stx
@@ -1193,7 +1193,7 @@ onMount(() => {
11931193@extends('layouts/default')
11941194
11951195@section('content')
1196{{-- No hand-written theme guard here. config/stx.ts declares app.colorMode, and
1196{{-- No hand-written theme guard here. config/ui.ts declares app.colorMode, and
11971197 stx emits the pre-paint boot script from that one declaration — first inside
11981198 <head>, above every stylesheet, reading the same loghq_theme key and setting
11991199 the same data-theme attribute this script used to set by hand. The generated
tsconfig.jsonmodified+1-1
Changes to tsconfig.json
@@ -28,7 +28,7 @@
2828 "@/*": ["./resources/*"]
2929 }
3030 },
31 // `satisfies UiOptions` in config/stx.ts is only evaluated if tsc sees the
31 // `satisfies UiOptions` in config/ui.ts is only evaluated if tsc sees the
3232 // file. It previously did not: this list covered nine project files and
3333 // matched nothing under config/ or resources/, so the one place a typo costs
3434 // an entire subsystem was unchecked. resources/stores/**/*.ts is here because