Skip to content

ADR 017: Adopt Ark UI as headless component library#3

Merged
vdavid merged 0 commit into
mainfrom
claude/research-ui-libraries-C1pFd
Jan 28, 2026
Merged

ADR 017: Adopt Ark UI as headless component library#3
vdavid merged 0 commit into
mainfrom
claude/research-ui-libraries-C1pFd

Conversation

@vdavid
Copy link
Copy Markdown
Owner

@vdavid vdavid commented Jan 24, 2026

Document the decision to use @ark-ui/svelte for accessible,
headless UI components styled with vanilla CSS. Covers the
full evaluation of 10+ libraries, comparison tables, and
rationale for choosing Ark UI over Bits UI and Melt UI.

@vdavid vdavid merged commit 4494b81 into main Jan 28, 2026
7 checks passed
@vdavid vdavid deleted the claude/research-ui-libraries-C1pFd branch May 19, 2026 09:04
vdavid added a commit that referenced this pull request May 20, 2026
Three fixes that all touch the same flow: existing OS-mounted SMB shares can now reach the fast direct-smb2 path automatically (or via MCP for agents), and agents can see which volumes are on which path.

Auto-upgrade for dev profiles (#1): `upgrade_existing_smb_mounts` now takes an `AppHandle` and calls `crate::network::ensure_mdns_started` itself when it finds SMB mounts to upgrade. The `firstTriggerDone` gate is gone from this call site — the function is a no-op when there are no SMB mounts (no network activity, no macOS Local Network prompt), so the gate was protecting nothing useful. With mounts present and `network.directSmbConnection` on (default true), mDNS now starts at launch and the upgrade can resolve hostname-keyed Keychain creds the same way the manual "Connect directly" button does. Dev profiles with `firstTriggerDone == false` and an auto-reconnected SMB share previously stayed on the slow OS-mount path indefinitely; that's the bug.

MCP visibility (#3): `cmdr://state`'s volumes section now emits structured entries for SMB volumes with `name`, `id`, and `smbConnectionState` (`direct` | `os_mount` | `disconnected`). Non-SMB volumes stay as bare `- {name}` lines for compactness. Agents can now distinguish which SMB shares are on the fast path.

MCP trigger (#2): new `upgrade_smb_to_direct` tool, sibling of `connect_to_server` and `remove_manual_server` in the network category. Thin wrapper around the same upgrade flow the manual UI uses. Calls a newly-extracted `upgrade_to_smb_volume_inner` helper (the Tauri command's body minus the concrete-AppHandle mDNS kick) so the MCP executor — generic over `Runtime` — can reuse the logic. Tool description steers agents: if mDNS isn't running and hostname-keyed Keychain creds matter, take a network action first.

Refactor along the way: `enrich_smb_connection_state` was duplicated across `commands/volumes.rs` (for `list_volumes`) and `volume_broadcast.rs` (for `volumes-changed`) with a "must stay in sync" gotcha. With MCP becoming a third caller, the sync risk grew. Extracted to `volumes::enrich_smb_connection_state`; all three call sites now share it. CLAUDE.md gotcha → decision.

Tests / docs:
- MCP `test_all_tools_count` / `test_network_tools_count` bumped (29 → 30, 2 → 3).
- MCP `test_total_tool_count` bumped to 30.
- file_system/volume/CLAUDE.md startup-upgrade lifecycle entry updated to reflect the new mDNS-kick path and no-gate semantics.
- mcp/CLAUDE.md tool count, network category list, and `cmdr://state` volumes-shape description updated.
- volumes/CLAUDE.md "two-site sync" gotcha replaced with a single-source decision entry.

Verified: full `./scripts/check.sh` green (50 checks, 1983 unit + 32 integration + every linter), including the 189 MCP unit tests.
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