Skip to content

feat(nix): add UI-embedded flake package, refresh lock + docs#1089

Open
mipmip wants to merge 1 commit into
DeusData:mainfrom
mipmip:feat/nix-ui-package
Open

feat(nix): add UI-embedded flake package, refresh lock + docs#1089
mipmip wants to merge 1 commit into
DeusData:mainfrom
mipmip:feat/nix-ui-package

Conversation

@mipmip

@mipmip mipmip commented Jul 14, 2026

Copy link
Copy Markdown

Fixes #1088

Problem

The flake only built the standard cbm target, which links src/ui/embedded_stub.c (no assets). So a binary from nix run/nix shell/nix build had no embedded UI, and --ui=true refused to start the HTTP server:

--ui requested, but this binary was built without the embedded UI, so the HTTP server will not start.

There was no Nix-native way to get the UI-embedded server, because cbm-with-ui runs npm ci && npm run build, which needs network access and can't run in the build sandbox as wired.

Changes

  • codebase-memory-mcp-ui flake package — the server with the graph UI embedded. Drops the prebuilt dist/ into graph-ui/dist, runs scripts/embed-frontend.sh directly, then make cbm-with-ui with frontend/embed marked up-to-date (-o) so npm never runs in the sandbox.
  • graph-ui flake package — the React frontend built via buildNpmPackage (deps fetched offline from the pinned graph-ui/package-lock.json via npmDepsHash).
  • README — Installation → Nix section documenting both server packages, nix run/nix build, and the stdin-EOF behaviour when run by hand.

Adjacent Nix cleanups folded in (same surface, kept to one focused PR):

  • flake version 0.6.00.9.0 to match the current release.
  • flake.lock refreshed (nixpkgs ~2026-04 566acc0 → 2026-07 6cdc7fc, ~3 months stale).
  • .gitignore — ignore nix build output symlinks (/result, /result-*).

Verification (x86_64-linux)

  • nix flake check passes.
  • nix build .#default and nix build .#codebase-memory-mcp-ui both succeed on the refreshed lock (npmDepsHash still validates).
  • UI binary serves over HTTP: GET / → 200 (index.html), /assets/*.js → 200 (1.3 MB, application/javascript), /assets/*.css → 200 (text/css); logs msg=ui.serving instead of the no-UI refusal.

Note on the version bump / lockfile / gitignore: these are per CONTRIBUTING.md build-system-adjacent — happy to split any of them into separate PRs if a maintainer prefers.

Fixes DeusData#1088

The flake only built the standard `cbm` target, so `nix run`/`nix shell`
produced a binary without the embedded UI — `--ui=true` refused to start
the HTTP server. Add two flake outputs:

- `graph-ui`: the React frontend built via buildNpmPackage (offline, from
  the pinned package-lock.json; npmDepsHash tracks the lockfile)
- `codebase-memory-mcp-ui`: the server with those assets embedded, built
  by dropping the prebuilt dist/ into place and running the embed + link
  path inside the sandbox (no network access)

Also fold in adjacent Nix cleanups: bump default.version 0.6.0 -> 0.9.0
to match the release, refresh flake.lock (nixpkgs 2026-04 -> 2026-07),
ignore ./result build symlinks, and document both packages in the README.

Signed-off-by: Pim Snel <post@pimsnel.com>
@mipmip mipmip requested a review from DeusData as a code owner July 14, 2026 13:07
@DeusData DeusData added this to the 0.9.2-rc milestone Jul 14, 2026
@DeusData DeusData added enhancement New feature or request ux/behavior Display bugs, docs, adoption UX editor/integration Editor compatibility and CLI integration priority/normal Standard review queue; useful PR with ordinary maintainer urgency. labels Jul 14, 2026
@DeusData

Copy link
Copy Markdown
Owner

Thanks for providing the Nix-native UI package. This is a normal-priority 0.9.2-rc enhancement. Because it updates the nixpkgs lock and introduces an npm dependency hash, review will verify the pinned revision and hash, offline reproducibility on each supported system, and that the existing standard package remains unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

editor/integration Editor compatibility and CLI integration enhancement New feature or request priority/normal Standard review queue; useful PR with ordinary maintainer urgency. ux/behavior Display bugs, docs, adoption UX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(nix): flake has no UI-embedded package — nix run/shell can't serve --ui

2 participants