Skip to content

fix(contacts): contact = standard entity page (inline properties + body editor) + sidebar/panel consistency (9.23.6, F-388)#115

Merged
th3-br41n merged 2 commits into
mainfrom
fix/contacts-page-layout
Jul 8, 2026
Merged

fix(contacts): contact = standard entity page (inline properties + body editor) + sidebar/panel consistency (9.23.6, F-388)#115
th3-br41n merged 2 commits into
mainfrom
fix/contacts-page-layout

Conversation

@th3-br41n

Copy link
Copy Markdown
Contributor

Reworks the Contacts detail into the standard entity page and fixes the left-panel/inspector inconsistencies reported 2026-07-08 (friction F-388, plan iteration 9.23.6 — docs PR: brainstorm-os/harness#39).

What changed

Contact page (the repeated ask): the detail now follows the Tasks-detail convention —

  • hero (avatar + editable name styled as an editor page title — carries the .bs-input face class for the control ratchet, :root overrides strip the resting box/ring, Database-title-input precedent),
  • an inline property block at the top: the shared properties-panel cells via one personPropertyRows path feeding both this block and the slide-over inspector (anniversary Date row added; bio row dropped),
  • the shared BrainstormEditor body below, bound to the person's UniversalBody/v1 Y.Doc (useYDoc(person.id) through the app-installed resolver — the same transport as Notes/Journal/Tasks/Bookmarks). Legacy bio seeds the body on first open and is cleared after the first real edit.

Shared seeding helpers: plainTextToSerializedState / hasLegacyText / shouldClearLegacyText extracted to @brainstorm/editor at their second consumer; Tasks' seed-body now delegates (API + tests unchanged).

Left panel: search is the shared <Searchbar> (the bespoke .bs-input composite's focus ring overflowed past the sidebar border — root cause was a missing min-width: 0; the shared bar owns chrome/focus/clear-✕), sitting in a 44px slot on the panel-header baseline; the list scroller now carries the inline inset rows/group headers were missing.

Right panel: rides @brainstorm/sdk/panel-state (window-scoped sessionStorage) with a closed default — was hardcoded useState(true), so every launch opened with the inspector covering the page.

Editor-host hygiene: app root no longer wraps in <StrictMode> (dev double-mount breaks the @lexical/yjs binding — same rationale as Notes); one PropertiesProvider for both property surfaces; ydoc bridge declared on the runtime type.

Verification

  • bun run verify green (typecheck packages+apps, all app bundles, 375 in-process pipeline tests); bun run lint green incl. control-faces / css-tokens / app-i18n ratchets; contacts suite 126 tests, new plain-text-state tests in @brainstorm/editor.
  • Dogfood (production bundle, seeded Northbound vault): 228-deep-contacts re-run — create / rename / birthday-edit / persistence PASS (its stale old-layout selectors are superseded); new 229-contacts-page-probe (in harness PR chore: remove experiments/ from the public repo #39) — 9/10 PASS: right panel closed on launch, shared searchbar, inline role edit reflected in the hero subtitle, body editor typing, body survives navigate-away-and-back (Y.Doc released + re-resolved), search filter. The one FAIL is the probe's own cleanup selector (clicked a hidden row-hover ⋯), not a product path — the header ⋯ menu renders Open / Pin / Import vCard / Export vCard / Delete correctly (228 shot 12).

Security

No new capabilities, IPC methods, or dependencies beyond lexical (already vendored, same pin as Bookmarks/Tasks) added to the contacts app bundle. The Y.Doc surface rides the existing entities.write:Person/v1 grant, identical to Bookmarks' 9.18.7 wiring.

🤖 Generated with Claude Code

th3-br41n and others added 2 commits July 8, 2026 12:53
…itor, shared searchbar, right panel closed by default

- Contact detail is now the standard entity page: hero (avatar + borderless
  editable name), the person's properties as an inline shared-cells block at
  the top (Tasks-detail convention), and the shared BrainstormEditor
  (Lexical + Yjs) below, bound to the person's UniversalBody Y.Doc.
- Legacy bio seeds the body on first open and is cleared after the first
  real edit (same contract as Tasks' notes migration); bio row dropped from
  the property defs, anniversary row added.
- Sidebar: shared <Searchbar> replaces the hand-rolled .bs-input field (no
  more focus-ring overflow past the panel edge), list rows/groups get the
  inline inset they were missing.
- Right properties panel: window-scoped panel-state with a CLOSED default
  (was hardcoded open on every launch).
- Extracted plainTextToSerializedState/hasLegacyText/shouldClearLegacyText
  to @brainstorm/editor (2nd consumer); Tasks' seed-body delegates to it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… editor-bearing app root

- One provider wraps both property surfaces (inline page block + slide-over
  inspector) — one store / one catalog list() IPC instead of two.
- The full-app root is no longer wrapped in <StrictMode>: the page now hosts
  a @lexical/yjs body editor and StrictMode's dev double-mount re-binds it
  to an already-applied Y.Doc (blank body on reopen) — same fix + rationale
  as apps/notes/src/main.tsx. The widget branch keeps StrictMode.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@th3-br41n th3-br41n merged commit dcd90f4 into main Jul 8, 2026
3 checks passed
@th3-br41n th3-br41n deleted the fix/contacts-page-layout branch July 8, 2026 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant