Register the settings tab and prove it renders #2

Closed
opened 2026-10-25 14:57:48 +00:00 by dsh · 2 comments
Owner

Goal

Prove the UI seat before building on it: a "Whale Noises" page inside Settings, registered through the settings.section slot, rendering a placeholder.

Scope

  • lib/client.js: ctx.slots.inject('settings.section', () => ctx.slots.register({ name: 'settings.section', id: 'dsh-whale-noises', order: 70, label: () => 'Whale Noises', locale: 'dsh-whale-noises', inject: () => ({ ctx }) }, Component)).
  • icon.svg (whale-ish, original) + locale/en.json with the tab/description strings.
  • Placeholder component: title, one-line description, current version, and a disabled "Engine: not configured yet" row.
  • Guard the registration in try/catch and log once; a wrong slot name fails silently (verified in dsh-client-ui-settings).

Acceptance

  • Settings shows a Whale Noises entry next to the built-in sections; the page renders without touching the chat.
  • No console error on load, enable, disable, or HMR reload.
  • The label is a static string (not a locale lookup at render time) — a reactive label can take the whole client batch down.

Notes

  • Pattern reference: dsh-gitea/lib/client.js:2280 (registration) and dsh-client-ui-settings-general/lib/client.js:1145 (slot consumption).
  • Depends on #1. Part of M0.
## Goal Prove the UI seat before building on it: a "Whale Noises" page inside Settings, registered through the `settings.section` slot, rendering a placeholder. ## Scope - [ ] `lib/client.js`: `ctx.slots.inject('settings.section', () => ctx.slots.register({ name: 'settings.section', id: 'dsh-whale-noises', order: 70, label: () => 'Whale Noises', locale: 'dsh-whale-noises', inject: () => ({ ctx }) }, Component))`. - [ ] `icon.svg` (whale-ish, original) + `locale/en.json` with the tab/description strings. - [ ] Placeholder component: title, one-line description, current version, and a disabled "Engine: not configured yet" row. - [ ] Guard the registration in try/catch and log once; a wrong slot name fails silently (verified in dsh-client-ui-settings). ## Acceptance - Settings shows a **Whale Noises** entry next to the built-in sections; the page renders without touching the chat. - No console error on load, enable, disable, or HMR reload. - The label is a static string (not a locale lookup at render time) — a reactive label can take the whole client batch down. ## Notes - Pattern reference: `dsh-gitea/lib/client.js:2280` (registration) and `dsh-client-ui-settings-general/lib/client.js:1145` (slot consumption). - Depends on #1. Part of M0.
dsh added this to the M0 — Foundations milestone 2026-10-25 14:57:48 +00:00
Author
Owner

Settings seat landed with the scaffold.

  • Registers settings.section with id: dsh-whale-noises, order: 70, static label Whale Noises, inject: () => ({ ctx }); registration guarded with try/catch and a one-line error.
  • Placeholder page: title, one-line promise, status card (engine/voice/auto-read), version from the build (__PLUGIN_VERSION__ define), zero-host-overhead note. Uses DSH CSS variables and inline styles; no CSS injection yet.
  • Unit tests cover the registration options and the rendered copy (fake React).

Pending verification (operator): the tab becomes visible after the profile install + page reload (sandbox blocks ~/.dsh). Same command as #1: dsh plugin --profile web add /home/dsh/Projects/dsh-whale-noises. Leaving open until the tab is confirmed rendering.

**Settings seat landed** with the scaffold. - Registers `settings.section` with `id: dsh-whale-noises`, `order: 70`, static label `Whale Noises`, `inject: () => ({ ctx })`; registration guarded with try/catch and a one-line error. - Placeholder page: title, one-line promise, status card (engine/voice/auto-read), version from the build (`__PLUGIN_VERSION__` define), zero-host-overhead note. Uses DSH CSS variables and inline styles; no CSS injection yet. - Unit tests cover the registration options and the rendered copy (fake React). **Pending verification (operator):** the tab becomes visible after the profile install + page reload (sandbox blocks `~/.dsh`). Same command as #1: `dsh plugin --profile web add /home/dsh/Projects/dsh-whale-noises`. Leaving open until the tab is confirmed rendering.
Author
Owner

Delivered: settings.section renders and all subsequent settings slices are built on it.

Delivered: settings.section renders and all subsequent settings slices are built on it.
dsh closed this issue 2026-11-06 04:36:03 +00:00
Sign in to join this conversation.
No description provided.