Skip to content

refactor(nsh-ui): unify frontend surfaces with shared components - #4081

Open
kev1n77 wants to merge 11 commits into
openBitFun:openbitfun-rsfrom
kev1n77:audit/openbitfun-rs-component-library
Open

kev1n77 wants to merge 11 commits into
openBitFun:openbitfun-rsfrom
kev1n77:audit/openbitfun-rs-component-library

Conversation

@kev1n77

@kev1n77 kev1n77 commented Dec 4, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Add @openbitfun/nsh-ui, with shared tokens, icons, interaction primitives, and a 141-component catalog.
  • Adopt the shared components in the desktop workbench, settings, FlowChat, compact/mobile views, browser sign-in, Design Lab, public MiniApp Market, and Playbook.
  • Share the controls around embedded figures and whiteboards. Excalidraw continues to own drawing and editing. The offline whiteboard pack reuses the SDK fonts already in the repository.

Type and Areas

UI refactor across desktop, shared browser and mobile views, MiniApp Market, and component documentation.

Motivation / Impact

Keep controls, icons, and feedback consistent across clients and give contributors one place to maintain their presentation and interaction.

Verification

  • nsh check from src/nsh-ui passed. The two artifact and image-preview regression tests passed.
  • node build.mjs --check and node --test test/whiteboard.test.mjs test/session-board.test.mjs from packages/personal-whiteboard passed all 36 tests against the packaged editor. Its assembled CSS and JavaScript matched a fresh standalone build byte for byte.
  • cargo test --offline -p openbitfun-product-domains --no-default-features --features miniapp --test miniapp_contracts passed 43 tests.
  • node scripts/i18n-audit.mjs, node scripts/audit-frontend-colors.mjs, node scripts/check-core-boundaries.mjs, git diff --check, and the Git object size gate passed.
  • nsh test . -j 6 from src/nsh-ui initially reported 1,084 passed and 12 failed. The MCP deletion confirmation selector was restored in a follow-up commit. nsh test App.test.tsx --filter 'MCP enable' and the shared component catalog's six tests passed after the fix.
  • Nine of the other failing cases reproduced at the same step on the base commit 2f409e4917. The legacy fleet plan case also failed on the base, at a different step. On the PR branch it still reports a scene render interruption before the tool card opens. The transcript auto-backfill case passed when rerun on its own.

AI-assisted. Testing level is partial. Local remote scenarios use fleet/controller fixtures. Physical mobile devices and production remote connections remain outside this verification.

Reviewer Notes

The commits are grouped by surface. For a visual review, open a conversation, open the composer + menu, then open a whiteboard and exercise drawing, undo/redo, and export.

Define the NSH controls, component catalog, icon source and brand geometry. Generate the shared token projection and include the library in native and browser bundle fingerprints.
Use the shared NSH controls in desktop and compact navigation, dialogs, and workspace tools. Add the tabbed workbench, Home overview and Task board with their routing and layout coverage.
Connect the workbench settings navigation to shared fields, options and layout. Include the existing appearance preview and account-usage view in the same settings flow.
Use shared message anatomy, recovery notices, toast and composer controls. Keep the attachment menu anchored to the plus button and cover that placement in the composer test.
Use native shared controls for supported figure widgets and retain the document reader for existing figures and external charts.
Move the surrounding controls, assistant and proposal preview to NSH. Keep Excalidraw's editing behavior and package the companion guest with its host protocol.
Package the controller launcher as an NSH browser surface and serve its runtime import map with the request nonce. Use the shared sign-in controls across controller entry points.
Use the NSH registry and native previews in Design Lab, with focused authoring and build coverage.
Use NSH for catalog, identity, publishing and administration pages. Build and serve the market bundles with their matching page routes and security policy.
Use shared NSH components for the Playbook layout and route navigation on desktop and mobile. Document the shared frontend ownership after all surfaces are wired.
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