Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
address review (codex): fix a11y test, legacy defaults, changelog
[._.]/ Adam Eivyfe0da5862822
diff --git a/client/src/pages/CharacterSheet.a11y.test.jsx b/client/src/pages/CharacterSheet.a11y.test.jsxindex 364d5d69b2..3239a521e2 100644--- a/client/src/pages/CharacterSheet.a11y.test.jsx+++ b/client/src/pages/CharacterSheet.a11y.test.jsx@@ -55,7 +55,7 @@ beforeEach(() => {});const findNameTrigger = () =>- screen.findByRole('button', { name: /edit character name/i });+ screen.findByRole('button', { name: /edit your name/i });describe('CharacterSheet name editing accessibility', () => {it('exposes the name as a labeled, keyboard-focusable button', async () => {@@ -86,7 +86,7 @@ describe('CharacterSheet name editing accessibility', () => {await waitFor(() => expect(put).toHaveBeenCalledWith('/character', { name: 'Strider' }, { silent: true }));// Back to the button view with the new name.await waitFor(() =>- expect(screen.getByRole('button', { name: /edit character name/i }))+ expect(screen.getByRole('button', { name: /edit your name/i })).toHaveTextContent('Strider'),);});@@ -106,7 +106,7 @@ describe('CharacterSheet name editing accessibility', () => {// First PUT is now pending; the trigger is back but disabled, so a click// (which would seed a stale 'Aragorn' input) is a no-op.- const trigger = await screen.findByRole('button', { name: /edit character name/i });+ const trigger = await screen.findByRole('button', { name: /edit your name/i });expect(trigger).toBeDisabled();fireEvent.click(trigger);expect(screen.queryByLabelText('Character name')).toBeNull();@@ -115,7 +115,7 @@ describe('CharacterSheet name editing accessibility', () => {resolvePut();await waitFor(() => expect(put).toHaveBeenCalledTimes(1));await waitFor(() =>- expect(screen.getByRole('button', { name: /edit character name/i })).not.toBeDisabled(),+ expect(screen.getByRole('button', { name: /edit your name/i })).not.toBeDisabled(),);});@@ -130,7 +130,7 @@ describe('CharacterSheet name editing accessibility', () => {// No save fired, and the original name is shown again.await waitFor(() =>- expect(screen.getByRole('button', { name: /edit character name/i }))+ expect(screen.getByRole('button', { name: /edit your name/i })).toHaveTextContent('Aragorn'),);expect(put).not.toHaveBeenCalled();diff --git a/client/src/pages/CharacterSheet.framing.test.jsx b/client/src/pages/CharacterSheet.framing.test.jsxindex c741a3acf7..caac995b2b 100644--- a/client/src/pages/CharacterSheet.framing.test.jsx+++ b/client/src/pages/CharacterSheet.framing.test.jsx@@ -84,6 +84,16 @@ describe('human-centered framing', () => {expect(screen.getByText('Your name')).toBeInTheDocument();expect(screen.getByText('Add a title')).toBeInTheDocument();});++ it('treats the legacy RPG defaults (fresh install) as unset, showing the human placeholder', async () => {+ // createDefaultCharacter() ships name:'Adventurer', class:'Developer'; a fresh install must+ // not present that generic adventurer (epic #2672).+ await renderChar({ name: 'Adventurer', class: 'Developer' });+ expect(screen.getByText('Your name')).toBeInTheDocument();+ expect(screen.getByText('Add a title')).toBeInTheDocument();+ expect(screen.queryByText('Adventurer')).not.toBeInTheDocument();+ expect(screen.queryByText('Developer')).not.toBeInTheDocument();+ });});describe('birth-date prompt', () => {diff --git a/client/src/pages/CharacterSheet.jsx b/client/src/pages/CharacterSheet.jsxindex 140731af15..c2a0af0955 100644--- a/client/src/pages/CharacterSheet.jsx+++ b/client/src/pages/CharacterSheet.jsx@@ -44,6 +44,16 @@ function hpColor(pct) {return 'bg-port-error';}+// createDefaultCharacter() seeds these generic RPG defaults on a fresh install, so the raw+// record's name/class are 'Adventurer'/'Developer' until the human edits them — which would+// make the human-centered page still present a generic adventurer (the exact thing epic #2672+// moves away from). Treat those legacy defaults as "unset" for display + edit-seeding so the+// human placeholder shows instead. Display-only: the persisted record is untouched (no data /+// federation change), and a user who genuinely wants either word can just type it back in.+const LEGACY_DEFAULT_NAME = 'Adventurer';+const LEGACY_DEFAULT_CLASS = 'Developer';+const humanValue = (value, legacyDefault) => (value && value !== legacyDefault ? value : '');+// Per-domain skills derived on read from each domain's existing stats (#2674). Deliberately// a plain read-only card: Slice 5 (#2677) owns the page's framing/redesign, so this stays// easy to restyle or relocate wholesale.@@ -193,8 +203,8 @@ export default function CharacterSheet() {return;}setChar(data);- setNameVal(data.name || '');- setClassVal(data.class || '');+ setNameVal(humanValue(data.name, LEGACY_DEFAULT_NAME));+ setClassVal(humanValue(data.class, LEGACY_DEFAULT_CLASS));} catch (err) {setLoadError(err.message || 'Failed to load character data');} finally {@@ -305,7 +315,7 @@ export default function CharacterSheet() {// could persist that stale value over the pending save (#2409).if (nameSaving) return;nameEditingRef.current = true;- setNameVal(char.name || '');+ setNameVal(humanValue(char.name, LEGACY_DEFAULT_NAME));setEditingName(true);};@@ -316,7 +326,7 @@ export default function CharacterSheet() {nameEditingRef.current = false;setEditingName(false);if (cancel) {- setNameVal(char.name || '');+ setNameVal(humanValue(char.name, LEGACY_DEFAULT_NAME));return;}if (!(nameVal.trim() && nameVal.trim() !== char.name)) return;@@ -400,6 +410,10 @@ export default function CharacterSheet() {const birthdayPct = Number.isFinite(char.ageYears)? Math.round((char.ageYears - Math.floor(char.ageYears)) * 100): 0;+ // Legacy RPG defaults ('Adventurer'/'Developer') read as unset, so a fresh install shows the+ // human placeholder rather than a generic adventurer (see humanValue above).+ const displayName = humanValue(char.name, LEGACY_DEFAULT_NAME);+ const displayClass = humanValue(char.class, LEGACY_DEFAULT_CLASS);return (<div className="h-full flex flex-col overflow-hidden">@@ -487,10 +501,10 @@ export default function CharacterSheet() {type="button"onClick={startNameEdit}disabled={nameSaving}- aria-label={`Edit your name (currently ${char.name || 'Your name'})`}+ aria-label={`Edit your name (currently ${displayName || 'Your name'})`}className="text-2xl font-bold text-white cursor-pointer hover:text-port-accent transition-colors truncate text-left bg-transparent border-0 p-0 disabled:opacity-60 disabled:cursor-wait">- {char.name || 'Your name'}+ {displayName || 'Your name'}</button>)}</div>@@ -511,7 +525,7 @@ export default function CharacterSheet() {className="text-sm text-gray-400 cursor-pointer hover:text-port-accent transition-colors"title="Click to edit your title">- {char.class || 'Add a title'}+ {displayClass || 'Add a title'}</span>)}</div>