From 1e4e0269ba160ac4905439d2265db0050a1cbc45 Mon Sep 17 00:00:00 2001 From: Jake Jarvis Date: Thu, 28 May 2026 11:18:28 -0400 Subject: [PATCH] fix: miscellaneous UI polish and doc link corrections MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix internal doc links to use absolute paths (`#anchor` → `/docs/page#anchor`) in `authoring.mdx` and `registry.mdx` so they resolve correctly from any page - Clarify `consumesPackages` description wording in the module field reference table - Switch category badge on module detail page from `outline` to `default` variant for better visual hierarchy - Nudge `IconCheck` margin, `Label` leading, and adapter-switcher category span font size for tighter alignment - Normalize `CardTitle` color from `text-foreground/85` → `text-foreground/80` and `text-muted-foreground` across stats cards for consistency; add `size="sm"` to per-category cards and tighten card spacing - Add `text-sm` to the "Learn more…" docs link on the home page so it inherits the correct size - Lighten `LastRefreshed` text from `/70` → `/85` opacity for legibility --- apps/web/content/docs/authoring.mdx | 26 ++++----- apps/web/content/docs/registry.mdx | 2 +- .../src/components/builder/module-cards.tsx | 4 +- .../src/components/builder/project-setup.tsx | 5 +- .../components/detail/adapter-switcher.tsx | 2 +- apps/web/src/lib/prerender.ts | 5 +- apps/web/src/routes/index.tsx | 2 +- .../web/src/routes/registry.$category.$id.tsx | 2 +- .../src/routes/registry.$category.index.tsx | 2 +- apps/web/src/routes/stats.tsx | 58 +++++++++---------- apps/web/src/server/highlighter.server.ts | 12 +++- 11 files changed, 62 insertions(+), 58 deletions(-) diff --git a/apps/web/content/docs/authoring.mdx b/apps/web/content/docs/authoring.mdx index dfb3c3a..15b7900 100644 --- a/apps/web/content/docs/authoring.mdx +++ b/apps/web/content/docs/authoring.mdx @@ -68,18 +68,18 @@ export default defineModule({ The whole shape is typed and validated at runtime — `defineModule` throws on the structural rules TypeScript can't express (e.g. `app` install-field overlays on `home: "repo"` modules), and `ModuleSchema` parses the JSON form the CLI fetches. -| Field | Required | What it does | -| -------------------- | -------- | -------------------------------------------------------------------------------------------------------------------- | -| `id` | ✓ | Stable identifier within a category. Used in `stanza add `. | -| `category` | ✓ | One of `KNOWN_CATEGORIES` — see [Categories](/docs/concepts#categories). | -| `label` | ✓ | Display name for the wizard, search results, and the web builder. | -| `description` | ✓ | One-line summary. Surfaced in `stanza search` and module cards. | -| `version` | ✓ | Semver string. Pinned into `stanza.json` at install time so future `update`/`swap` can read it. | -| `peers` | | `Partial>` — categories this module needs filled. | -| `consumesPackages` | | Dirs of other internal packages this one imports from (see [Cross-package consumption](#cross-package-consumption)). | -| `adapters` | ✓ | At least one. Each carries its own install fields, templates, and codemods. | -| `appKind` | | `"web"` or `"native"`. The runner refuses to install into an incompatible app. | -| `homepage`, `author` | | Surfaced in the web builder; otherwise informational. | +| Field | Required | What it does | +| -------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| `id` | ✓ | Stable identifier within a category. Used in `stanza add `. | +| `category` | ✓ | One of `KNOWN_CATEGORIES` — see [Categories](/docs/concepts#categories). | +| `label` | ✓ | Display name for the wizard, search results, and the web builder. | +| `description` | ✓ | One-line summary. Surfaced in `stanza search` and module cards. | +| `version` | ✓ | Semver string. Pinned into `stanza.json` at install time so future `update`/`swap` can read it. | +| `peers` | | `Partial>` — categories this module needs filled. | +| `consumesPackages` | | Dirs of other internal packages this one imports from (see [Cross-package consumption](/docs/authoring#cross-package-consumption)). | +| `adapters` | ✓ | At least one. Each carries its own install fields, templates, and codemods. | +| `appKind` | | `"web"` or `"native"`. The runner refuses to install into an incompatible app. | +| `homepage`, `author` | | Surfaced in the web builder; otherwise informational. | Module-level install fields (`dependencies`, `devDependencies`, `env`, `scripts`) are merged into every adapter — adapter-level values override per key, and `env` merges by `name`. Hoist anything that doesn't vary across adapters. @@ -231,7 +231,7 @@ The runner routes overlay fields into every consuming app's `package.json` (vs t ## Cross-package consumption -If your module's source imports from another internal package (e.g. Better Auth's `auth.ts` reads `db` from the orm package), declare the dependency at the module level: +If your module's source imports from another internal package (e.g. Better Auth's `auth.ts` reads `db` from the ORM package for its database schema), declare the dependency at the module level: ```ts defineModule({ diff --git a/apps/web/content/docs/registry.mdx b/apps/web/content/docs/registry.mdx index da5d986..969eb37 100644 --- a/apps/web/content/docs/registry.mdx +++ b/apps/web/content/docs/registry.mdx @@ -3,7 +3,7 @@ title: Registry description: The roadmap of first-party modules Stanza ships — what's available today and what's planned. --- -Every module fills exactly one **category**. This page is the canonical roadmap of the first-party modules Stanza ships: what's available today, and what's on the way. Third parties can publish their own modules under any `@scope` and have users pull them in alongside these — see the [Authoring manual](/docs/authoring) for the full surface, or jump to [Third-party modules](#third-party-modules) below for a pointer. +Every module fills exactly one **category**. This page is the canonical roadmap of the first-party modules Stanza ships: what's available today, and what's on the way. Third parties can publish their own modules under any `@scope` and have users pull them in alongside these — see the [Authoring manual](/docs/authoring) for the full surface, or jump to [Third-party modules](/docs/registry#third-party-modules) below for a pointer. ## Categories diff --git a/apps/web/src/components/builder/module-cards.tsx b/apps/web/src/components/builder/module-cards.tsx index c7238c1..6815587 100644 --- a/apps/web/src/components/builder/module-cards.tsx +++ b/apps/web/src/components/builder/module-cards.tsx @@ -202,7 +202,9 @@ const ModuleCard = memo(function ModuleCard({ View details - {selected && } + {selected && ( + + )}

{m.description}

diff --git a/apps/web/src/components/builder/project-setup.tsx b/apps/web/src/components/builder/project-setup.tsx index 352996a..1acb36e 100644 --- a/apps/web/src/components/builder/project-setup.tsx +++ b/apps/web/src/components/builder/project-setup.tsx @@ -48,7 +48,10 @@ export function ProjectSetup({ return ( -