Commit 98d5479
committed
Resolves #7408([FR-2892](https://lablup.atlassian.net/browse/FR-2892))
## Summary
Bumps `@cloudscape-design/board-components` from **3.0.60** to **3.0.176** and regenerates the local patch against the new sources. Also adds `@cloudscape-design/components` (`^3.0.1280`) as a direct dependency, because 3.0.176 introduced a runtime import that the bare peer-dep declaration no longer satisfies in this repo.
3.0.176 is the latest version that satisfies the repo's 7-day `minimumReleaseAge` quarantine in `pnpm-workspace.yaml` (3.0.178 is newer but still inside the quarantine window).
## Patch decision: kept + regenerated
The local patch is **kept** because upstream 3.0.176 still does not:
- Expose `className` on `BoardProps` / `BoardItemProps` (used by `BAIBoard.tsx` to style the board wrapper and items).
- Provide stable class-name selectors — the CSS-module class hashes rotate on every minor bump. We append stable `bai_board_*` / `bai_grid_item` suffixes so that `BAIBoard.tsx` styling and the E2E suite (`e2e/start/start-page.spec.ts`, `e2e/dashboard/dashboard.spec.ts`, `e2e/utils/classes/common/StartPage.ts`) can locate elements deterministically.
The regenerated patch is also cleaner than the 3.0.60 version: fixes a `String → string` type bug, uses the upstream `clsx(...)` pattern instead of hand-rolled string concat, and drops Prettier-formatted noise that bloated the prior diff (264 lines → 196 lines).
## New direct dependency: `@cloudscape-design/components`
board-components PR [#362](cloudscape-design/board-components#362) ("UAP directional controls and tooltips", merged 2025-06-24) made the drag/resize handles delegate to `InternalDragHandle` from `@cloudscape-design/components/internal/do-not-use/drag-handle`. Every version from that change onward (3.0.149+) carries the same import.
In 3.0.60 we got away with `@cloudscape-design/components` being a bare peer dep — nothing pulled it in at runtime, so pnpm never installed it. With 3.0.176 the import is real, and `pnpm dev` fails at vite pre-bundle with `Missing "./internal/do-not-use/drag-handle" specifier in "@cloudscape-design/components" package`. `scripts/verify.sh` does not catch this (TypeScript doesn't verify external-module subpath existence).
Mitigations:
- Pinned to `^3.0.1280` — the same minimum-release-age quarantine applies, so pnpm resolves to a stable, ≥7-day-old version.
- `@cloudscape-design/components` declares narrow `sideEffects` (CSS + base-component only), so Rollup tree-shaking should keep the production bundle close to "just the drag-handle module + its CSS". Install footprint (~37 MB / 5,558 files in `node_modules`) is the real cost, not bundle weight.
## Side effect: fewer Vite serving-allow-list warnings on dev
The dev server used to print recurring warnings like:
```
The request url ".../@cloudscape-design/board-components/3.0.60/.../internal/screenreader-grid-navigation/styles.scoped.css" is outside of Vite serving allow list.
```
caused by absolute paths baked into the published 3.0.60 source maps. 3.0.176 refactored the board internals and removed the `ScreenReaderGridNavigation` module entirely, so the offending sourcemap reference is gone and the warning no longer fires.
## Incidental lockfile changes
`pnpm install` reconciled a few unrelated rows:
- `vite@6.4.1 → 6.4.2` in the `@vitest/browser` snapshot.
- `eslint-plugin-import` re-resolved `@typescript-eslint/parser` between two existing variants — no new packages added.
- `@cloudscape-design/design-tokens@3.0.51` removed from the snapshot (upstream dropped it as a peer dep). Verified no direct imports of `@cloudscape-design/design-tokens` exist in `react/src` or `packages/backend.ai-ui/src`, so no action needed.
## Follow-up
Filing a Jira follow-up to migrate `BAIBoard` styling and E2E selectors away from injected `bai_*` class hooks (use `data-testid` instead). That would reduce future bumps to "just the `className` interface delta" or eliminate the patch entirely if upstream accepts a `className` upstream-PR.
## Test plan
- [x] `pnpm install --frozen-lockfile` applies cleanly.
- [x] `pnpm dev` boots: `vite` pre-bundle succeeds, `tsc --watch` reports 0 errors, board page reachable at `https://fr-2892.localhost:1356`.
- [ ] Open `/start` (and `/dashboard`): drag a board card across slots, resize a card width, reload — layout persists.
- [ ] `pnpm exec playwright test e2e/start/start-page.spec.ts e2e/dashboard/dashboard.spec.ts` passes against a real cluster.
[FR-2892]: https://lablup.atlassian.net/browse/FR-2892?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
1 parent 5da37c3 commit 98d5479
7 files changed
Lines changed: 268 additions & 342 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
| 85 | + | |
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| |||
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
99 | | - | |
| 100 | + | |
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
| |||
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
108 | | - | |
109 | | - | |
110 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
111 | 112 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
0 commit comments