Skip to content

refactor(site): use published shared UI controls - #99

Merged
fx merged 6 commits into
mainfrom
refactor/use-upstream-ui
Oct 28, 2026
Merged

fx merged 6 commits into
mainfrom
refactor/use-upstream-ui

Conversation

@fx

@fx fx commented Oct 28, 2026

Copy link
Copy Markdown
Owner

The landing site duplicated command-copy and theme-toggle controls already suitable for the shared UI library. Use the published upstream controls, remove the local implementations, and keep application-level interaction tests for copy and theme behavior.

Use explicit Tailwind application and library sources so dependency internals are not scanned. Preserve the site's content, layout, and development host configuration.

Contract: docs/changes/0046-adopt-upstream-ui-controls.md and docs/specs/architecture/index.md. This completes 0046. The exact upstream preview 0.0.0-a481115 is pinned in the dependency manifest and lockfile; it includes the merged packaging and component contributions. Move the pin to a stable release once one includes these changes.

Test plan

  • Install from the frozen published dependency lockfile without a local package link.
  • Run the unified root/site quality check with 100% required coverage and both builds passing.
  • Verify the final published controls in Chromium: multiline clipboard content, accessible feedback, both theme directions, keyboard use, and narrow-screen layout.
  • Confirm no browser console errors and no chart-selector CSS warnings.

Copilot AI lite review requested due to automatic review settings October 28, 2026 18:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The test leaves a process-wide fake clipboard installed because cleanup does not restore it, creating order-dependent behavior and potentially masking the fallback path.

1 open issue
What changed in this PR

This pull request replaces the site's duplicated command-copy and theme-toggle controls with the published @fx/ui components while preserving the existing layout, content, styling, and development configuration.

Changes:

  • Uses the pinned upstream CommandBlock, ThemeToggle, and ThemeProvider components.
  • Removes the local control implementations and redundant component tests.
  • Adds application-level interaction coverage for copy and theme behavior.
  • Restricts Tailwind scanning to explicit application and library sources.
  • Updates dependency locks and records change 0046 as complete.

This pull request requires changes.

File Description
site/​test/​components.test.tsx Removes tests for the deleted local controls.
site/​test/​application.test.tsx Adds application-level copy and theme interaction tests.
site/​src/​index.css Configures explicit Tailwind sources for site and library code.
site/​src/​components/​ThemeToggle.tsx Removes the local theme-toggle implementation.
site/​src/​components/​CommandBlock.tsx Removes the local command-copy implementation.
site/​src/​App.tsx Imports and renders the shared controls from @fx/ui.
site/​package.json Pins the published @fx/ui preview dependency.
site/​bun.lock Locks the updated UI package and dependency metadata.
docs/​index.yml Registers change 0046 as complete.
docs/​index.md Adds change 0046 to the change history index.
docs/​changes/​0046-adopt-upstream-ui-controls.md Documents the upstream-control adoption and requirements.

Review effort: Lite

Comment thread site/test/application.test.tsx Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

An active documentation issue leaves the new 0046 entry outside the Changes table because of an extra blank line.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Low severity Remove blank line so 0046 remains in the Changes table

docs/​index.md:24

The blank line before this new row terminates the Markdown table, so the 0046 entry renders as a standalone pipe-delimited paragraph instead of appearing in the Changes table. Remove the separator so this row stays contiguous with 0045.

1 resolved since last review

Review effort: Lite

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The evidence identifies no unresolved review concerns for the shared-control migration.

No open issues 🎉

Review effort: Lite

@fx
fx merged commit a67611c into main Oct 28, 2026
2 checks passed
@fx
fx deleted the refactor/use-upstream-ui branch October 28, 2026 18:21
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.

2 participants