Fix web app-host Vite resolution for ui table-dnd subpaths #355

Closed
opened 2026-06-07 21:42:40 +00:00 by steve · 0 comments
Owner

The Web/PWA publish workflow fails in the clean Docker build because the web
host Vite config does not resolve the explicit @lapis-notes/ui/table-dnd/*
subpaths back to UI source the way workspace and desktop-electron already do.
Local builds can mask the problem when packages/ui/dist exists, but the
publish image only has a fresh workspace install.

Problem

publish-web.yml run 264 fails during pnpm --filter @lapis-notes/web build
with:

Rollup failed to resolve import "@lapis-notes/ui/table-dnd/sensors" from "/app/packages/plugins/plugin-csv/src/lib/components/csv-data-table.svelte"

The shared table DnD contract already documents @lapis-notes/ui/table-dnd,
@lapis-notes/ui/table-dnd/sensors, and @lapis-notes/ui/table-dnd/utils as
supported subpaths. Workspace and desktop-electron had follow-up fixes for
their host-local Vite registries in #276, but the web host kept its own inline
UI resolveSubpath handler without those explicit cases.

Goal

Make the web app-host Vite resolver honor the same explicit UI table DnD
subpaths as the other app hosts so clean Web/PWA builds do not depend on
packaged @lapis-notes/ui/dist artifacts.

Scope

  • Update packages/web/vite.config.ts UI resolveSubpath handling for
    table-dnd/sensors and table-dnd/utils.
  • Confirm the source-resolution contract/spec mentions app-host coverage for the
    web host as well as workspace and desktop-electron if needed.
  • Run targeted validation that catches the regression without rerunning the full
    publish workflow.

Non-goals

  • Reworking CSV table preview behavior or DnD UX.
  • Changing published @lapis-notes/ui package exports.
  • Broad Docker or workflow changes unrelated to import resolution.

Acceptance Criteria

  • @lapis-notes/web resolves @lapis-notes/ui/table-dnd/sensors and
    @lapis-notes/ui/table-dnd/utils to UI source in its host-local Vite config.
  • A clean web build no longer fails on the CSV plugin import when ui/dist
    artifacts are absent.
  • Relevant spec text stays aligned with the actual app-host coverage.

Implementation Notes

  • Follow the pattern already used in #276 for workspace and desktop-electron.
  • Prefer the narrowest fix in the web host UI resolver over adding fallback
    dist dependencies.

Suggested Files or Specs To Inspect

  • packages/web/vite.config.ts
  • packages/ui/package.json
  • packages/plugins/plugin-csv/src/lib/components/csv-data-table.svelte
  • spec/src/30-cross-package-contracts/first-party-source-resolution.md
  • spec/src/30-cross-package-contracts/drag-drop-patterns.md

Validation Commands

  • pnpm check:source-resolution
  • pnpm --filter @lapis-notes/web check:all
  • pnpm --filter @lapis-notes/web build

Follow-up Tasks

Implementation Summary

Added web-host UI table-dnd subpath resolution for table-dnd sensors/utils, aligned web and source-resolution specs, and validated with check:source-resolution, @lapis-notes/web check:all/test/build, repo check:all, and mdbook build spec.

The Web/PWA publish workflow fails in the clean Docker build because the web host Vite config does not resolve the explicit `@lapis-notes/ui/table-dnd/*` subpaths back to UI source the way workspace and desktop-electron already do. Local builds can mask the problem when `packages/ui/dist` exists, but the publish image only has a fresh workspace install. ## Problem `publish-web.yml` run 264 fails during `pnpm --filter @lapis-notes/web build` with: `Rollup failed to resolve import "@lapis-notes/ui/table-dnd/sensors" from "/app/packages/plugins/plugin-csv/src/lib/components/csv-data-table.svelte"` The shared table DnD contract already documents `@lapis-notes/ui/table-dnd`, `@lapis-notes/ui/table-dnd/sensors`, and `@lapis-notes/ui/table-dnd/utils` as supported subpaths. Workspace and desktop-electron had follow-up fixes for their host-local Vite registries in #276, but the web host kept its own inline UI `resolveSubpath` handler without those explicit cases. ## Goal Make the web app-host Vite resolver honor the same explicit UI table DnD subpaths as the other app hosts so clean Web/PWA builds do not depend on packaged `@lapis-notes/ui/dist` artifacts. ## Scope - Update `packages/web/vite.config.ts` UI `resolveSubpath` handling for `table-dnd/sensors` and `table-dnd/utils`. - Confirm the source-resolution contract/spec mentions app-host coverage for the web host as well as workspace and desktop-electron if needed. - Run targeted validation that catches the regression without rerunning the full publish workflow. ## Non-goals - Reworking CSV table preview behavior or DnD UX. - Changing published `@lapis-notes/ui` package exports. - Broad Docker or workflow changes unrelated to import resolution. ## Acceptance Criteria - `@lapis-notes/web` resolves `@lapis-notes/ui/table-dnd/sensors` and `@lapis-notes/ui/table-dnd/utils` to UI source in its host-local Vite config. - A clean web build no longer fails on the CSV plugin import when `ui/dist` artifacts are absent. - Relevant spec text stays aligned with the actual app-host coverage. ## Implementation Notes - Follow the pattern already used in #276 for workspace and desktop-electron. - Prefer the narrowest fix in the web host UI resolver over adding fallback dist dependencies. ## Suggested Files or Specs To Inspect - `packages/web/vite.config.ts` - `packages/ui/package.json` - `packages/plugins/plugin-csv/src/lib/components/csv-data-table.svelte` - `spec/src/30-cross-package-contracts/first-party-source-resolution.md` - `spec/src/30-cross-package-contracts/drag-drop-patterns.md` ## Validation Commands - `pnpm check:source-resolution` - `pnpm --filter @lapis-notes/web check:all` - `pnpm --filter @lapis-notes/web build` ## Related Issues - Follow-up to #276 — [Fix workspace and desktop app-host vite resolution for ui table-dnd subpaths](../closed/276-fix-workspace-and-desktop-app-host-vite-resolution-for-ui-table-dnd-subpaths.md) ## Follow-up Tasks ## Implementation Summary Added web-host UI table-dnd subpath resolution for table-dnd sensors/utils, aligned web and source-resolution specs, and validated with check:source-resolution, @lapis-notes/web check:all/test/build, repo check:all, and mdbook build spec. <!-- backlog:task_id=TASK-WEB-UI-TABLE-DND-SUBPATHS source_spec=spec/src/30-cross-package-contracts/first-party-source-resolution.md related_issue=276 -->
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lapis-notes/lapis#355
No description provided.