PDFs produced by CEB-to-PDF converters (government docs) carry non-embedded
CJK fonts keyed by CMap encodings like GBK-EUC-H; pdf.js needs the matching
.bcmap to map glyph ids, otherwise the page renders with no visible text.
- Copy the complete cmaps/ set (169 files, incl. GBK-EUC-H) from pdfjs-dist
into both apps' static assets via viteStaticCopy, same pattern as
pdf.worker.min.js.
- client: pass cMapUrl/cMapPacked to both getDocument call sites (file
preview + knowledge file preview), which previously had no CMap config.
- platform: drop the 3 hand-picked .bcmap files from public/cmaps (missing
GBK-EUC-H among others); the build now supplies the full set.
The sidebar scroll container has container-type: inline-size, which makes it
the containing block for position:fixed descendants. The context-menu's
invisible fixed trigger was therefore offset from the cursor (visible in the
WeCom WebView; near-invisible in a normal browser only because the container
sits near the viewport origin). Render the whole DropdownMenu via createPortal
to document.body so the trigger's fixed position anchors to the viewport again,
matching the file-card menu. React events still bubble through the component
tree, so the existing stopPropagation guards on the row still hold.
design-token.cjs is the single source of truth for client tokens; tailwind.docs.config.cjs layers its tailwindTheme over the app config (app config untouched) for the docs build only. rspress.config wires a docs-only postcss/tailwind pipeline; rspress-overrides.css maps rspress --rp-* chrome tokens + doc typography onto the BiSheng tokens so the spec site renders by its own rules in both themes. .md-only strip loader (MDX rejects the site-hide HTML comments).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add the official Arco gray.dark ramp under .dark plus --bg-page (white→#121212). Since the semantic --text/--fill/--border tokens in :root resolve var(--arco-gray-N) lazily, they auto-flip in dark mode app-wide. Neutral only this round; brand + functional dark ramps still pending (known debt).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
GET /api/v1/user/list dumped the full User ORM row in non-simple mode,
exposing password (MD5 hash), password_update_time, and token_version —
none of which the frontend consumes. Strip these sensitive/internal
columns from each entry before returning.
Update GalleryApp wiring and the Button/Color/Confirm/Modal/Typography progress trackers + ProgressOverview.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
styles.module.css used a bare `a` element selector, which CSS Modules does NOT hash — it leaked a global `a { color: white }` app-wide (and into the docs site), whiting out unstyled links in light contexts. Scope it to `.tooltipHtml a` and apply the class on the injected-HTML container.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Disable SSG (demos pull real components whose deps resolve SSR-only node builds like @dicebear/converter → sharp/resvg we don't install); add Typography/Color/Modal/Confirm/Feedback/Icon/Illustration demos to the nav; exclude 00-总纲 (Claude working charter) from routes+search; nav activeMatch; preEntry regenerator-runtime + rspress-overrides.css (restore document flow so the sticky nav works); filenamify-stub (node:path unbundlable, reached via ~/hooks, never executed); strip-internal-loader.cjs removes internal ledger/changelog sections from spec md pre-MDX so TOC/search stay clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
get_user_department_spaces only matched department membership or a
membership row, so a user granted ad-hoc viewer/editor/manager access
(FGA relation only, no membership row) saw the space under 我加入的
instead. Union in the user's FGA-readable spaces intersected with the
department-bound set so they land under 部门知识空间.
npm run dev:docs / build:docs serve the design specs + live component demos (@rspress/plugin-preview) with the app's vite aliases and style.css mirrored into the rspack config; stubs/url-stub.ts shims Node's url module for the browser bundle. doc_build/ output gitignored.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The page styled itself with class names that tailwind.config.js never
defined (text-text-primary, text-text-secondary, text-text-tertiary,
border-border-subtle, bg-background-primary). These emit no CSS, so text
colours came from inheritance and only happened to look right on light
backgrounds. Map them onto the tokens that do exist -- foreground,
muted-foreground, border, card, background -- and add dark variants to the
hardcoded gray/status colours.
Opacity modifiers on `white` are unusable here: tailwind.config.js
overrides white to var(--white), and Tailwind v3 cannot apply an alpha
channel to a CSS variable, so `bg-white/5` is dropped entirely. Use the
gray-50 scale for translucent dark overlays instead.
The tool overwrites .coaligneignore with its own default template, so tracking it means the rewrite lands in everyone's tree — keep it per-developer alongside .coaligne/.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The .coaligne/ dir holds per-developer project bindings that the tool regenerates (it re-binds and rewrites them on its own), so it should never have been tracked — untrack the two committed state files and ignore the dir.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Update GalleryApp wiring and the Button/Color/ConfirmDialog/Feedback/Illustration/Modal/Responsive/Typography showcases.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The old .theme-green steps sat at hue ~157 (teal) while --brand-500 is 142, so the main color jumped out of its own ramp. Light steps keep the old saturation/brightness envelope with the hue rotated onto the 500 family (-2/step, mirroring the blue lights); dark steps mirror the blue ramp's dark-side HSV geometry. --brand-500/main unchanged; surface-active-alt re-synced to --brand-50. Values updated in BRAND-THEME-HANDOFF.md.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The bench 首页/订阅/应用中心 tabs anchor their bottom save buttons with
absolute bottom-1 on CardContent, whose height is tuned via a 100vh-180px
magic constant that assumes no CardContent bottom padding. These tabs kept
CardContent's default p-5 (20px bottom padding) while the working 知识空间
tab uses p-0, so their content ran 20px taller. With slack that overshoot
was absorbed, but when the license-expiry banner appears it consumes the
slack and the buttons spill below the viewport, half-clipped. Add pb-0 to
match the 知识空间 tab.
The code-interpreter tool description said nothing about which Python packages
are available, so the model guessed — reaching for pdfminer.six to read PDFs (a
common default) which is NOT installed in the backend env, producing spurious
"No module named 'pdfminer'" output (it fell back to fitz, but the noise leaked
into the run).
Declare the actually-installed libraries (verified in the backend env: pandas,
numpy, matplotlib, openpyxl / XlsxWriter, python-docx, Pillow, reportlab, PyMuPDF)
and steer PDF reads to `fitz`, away from pdfminer / pdfplumber / PyPDF2. Also tell
the model not to `pip install` (shared, offline env). LocalExecutor only — e2b is
a different sandbox with a different image, not asserted here. Adds a
description-contract regression test.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The code-interpreter tool description said nothing about which Python packages
are available, so the model guessed — reaching for pdfminer.six to read PDFs (a
common default) which is NOT installed in the backend env, producing spurious
"No module named 'pdfminer'" output (it fell back to fitz, but the noise leaked
into the run).
Declare the actually-installed libraries (verified in the backend env: pandas,
numpy, matplotlib, openpyxl / XlsxWriter, python-docx, Pillow, reportlab, PyMuPDF)
and steer PDF reads to `fitz`, away from pdfminer / pdfplumber / PyPDF2. Also tell
the model not to `pip install` (shared, offline env). LocalExecutor only — e2b is
a different sandbox with a different image, not asserted here. Adds a
description-contract regression test.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>