Skip to content

ci: build dashboard before installing the package#5

Merged
auxten merged 1 commit into
auxten:mainfrom
xianml:fix/ci-build-dashboard-before-install
May 26, 2026
Merged

ci: build dashboard before installing the package#5
auxten merged 1 commit into
auxten:mainfrom
xianml:fix/ci-build-dashboard-before-install

Conversation

@xianml

@xianml xianml commented May 21, 2026

Copy link
Copy Markdown

Summary

CI has been red on every run of the test workflow on main since the v1 rebuild (32d091e), and the release v0-final run failed the same way — which is why v1 hasn't shipped to PyPI.

Root cause: pyproject.toml force-includes src/clickmem/dashboard/dist/ into the wheel, but that directory is gitignored (it's a Vite build artefact regenerated by make dashboard). Neither test.yml nor release.yml builds the dashboard before invoking the Python build backend, so hatchling fails with:

FileNotFoundError: Forced include not found:
.../src/clickmem/dashboard/dist

Example failing run: https://github.com/auxten/clickmem/actions/runs/25904341501

Fix

Add Node 20 + pnpm 9 setup, then pnpm install --frozen-lockfile && pnpm build in src/clickmem/dashboard, before the Python install / build step. Applied to both test.yml and release.yml. This matches:

  • the make dashboard target's pnpm install && pnpm build recipe, and
  • the pnpm version already pinned in dashboard.yml (version: 9).

The misleading comment "(includes prebuilt dashboard/dist)" on the release wheel build step is updated to point to the now-actually-prebuilt step above it.

Trade-offs considered

  • Inline build per matrix job (chosen): simple, low surface area. Each Python matrix job (2 OS × 3 versions = 6 jobs) does its own pnpm install + build. Adds ~1 min per job.
  • Separate "build-dashboard" job + artifact: more efficient, but more workflow surface area and a cross-job dependency. Can be done as a follow-up if CI time becomes a concern.
  • Make the force-include conditional (custom hatch build hook): possible, but skipping the dashboard in editable installs means the running server has no UI at /dashboard/, which is a worse default than just building it.

Test plan

  • CI on this PR turns green on all 6 matrix jobs.
  • After merge, tag a v1.0.x to verify the release workflow runs end-to-end and publishes to PyPI.

🤖 Generated with Claude Code

`pyproject.toml` force-includes `src/clickmem/dashboard/dist/` into the
wheel, but that directory is gitignored (it's a Vite build artefact
regenerated by `make dashboard`). Neither `test.yml` nor `release.yml`
ran the dashboard build before `pip install -e .` / `python -m build`,
so hatchling failed with:

    FileNotFoundError: Forced include not found:
    .../src/clickmem/dashboard/dist

This has broken every `test` workflow run on main since the v1 rebuild
(32d091e) and broke the `release v0-final` run too, which is why no
v1.x has shipped to PyPI yet.

Fix: add Node 20 + pnpm 9 setup and run `pnpm install --frozen-lockfile
&& pnpm build` in `src/clickmem/dashboard` before the Python install /
build step, in both workflows. Matches the existing `make dashboard`
target and the pnpm version already pinned in `dashboard.yml`.
@xianml

xianml commented May 21, 2026

Copy link
Copy Markdown
Author

i want try clickmem, seems not work. seems CI is broken and iPypi version does not match latest code

@auxten auxten merged commit 31afbae into auxten:main May 26, 2026
6 checks passed
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.

3 participants