- no-restricted-syntax flags Chinese in string/template/JSX literals in all three packages
- existing violations frozen into eslint-suppressions.json (shrink-only)
- @bisheng/ui: zero violations in component source; .cjs tooling exempt (token metadata is internal docs)
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.
Same class of issue as the platform fix: modules imported directly but
never declared, resolvable locally only via legacy node_modules
leftovers, broken under CI's frozen-lockfile install.
- add explicit deps: unist-util-visit, unified, dedent,
@tanstack/react-virtual, @rc-component/mini-decimal,
@radix-ui/react-slot (via workspace catalog)
- useMessages.ts: import useParams from react-router-dom (declared)
instead of react-router (undeclared transitive)
- add unist-util-visit as an explicit dependency (imported by
MessageMarkDown.tsx but only resolvable via legacy hoisting; broke
tsc-strict in CI's frozen-lockfile install)
- FilterByUser.tsx: import debounce from lodash-es (declared) instead
of lodash (undeclared, unresolvable in a clean install — would break
vite build)
Dify-style "freeze legacy, block new" quality gates for both frontend apps:
- ESLint 9 flat configs for platform, client and @bisheng/ui (shared
toolchain installed at workspace root). House rules: no-explicit-any,
no raw axios imports (C7), no-console (warn/error allowed),
react-hooks rules as errors, ts-expect-error with description only.
- Legacy violations frozen per app in eslint-suppressions.json
(may only shrink; run lint:prune after cleaning a file).
- TS strict via typescript-strict-plugin: legacy failing files annotated
with @ts-strict-ignore (platform 388, client 163); all other and all
new files fully strict-checked; tsc-strict wired as typecheck script.
- platform tsconfig target es5 -> ES2020.
- New CI workflow frontend-quality.yml: PR-triggered, path-filtered,
lint + typecheck for both apps.
- Gate policy documented in root AGENTS.md; @bisheng/ui starts at zero
suppressions (fixed 1 dead var, removed 6 stale disable directives).
Exclude 元-文档撰写规范 (author-only how-to) from routes+search alongside 00-总纲. Consolidate the mono stack into one --bs-font-mono var referenced by --rp-font-family-mono, the .rspress-doc code rule (now !important so the app's legacy code font can't out-specify it), and the spec pages' inline code — change the stack in one place.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
One table style across the whole site (native md tables + hand-styled spec mdx tables), matching the design-token page's TokenTable: full-width, rounded outer frame on --radius, light --fill-1 header with medium text, horizontal rules only in --border-base, no zebra, theme-switch in lockstep. Move 多端适配 from 设计规范 into the 设计模式 group.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Group the 组件 sidebar into 基础/通用/反馈 categories, add a Design Token page + a 设计模式 group; alias bisheng-icons to the local install so spec mdx page bodies can import real icons; sidebar/TOC hover+active marked by text color only (drop the brand-tint background pill). Title cased to BISHENG.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Split --btn-gray-solid-bg from --btn-gray-text and add --btn-disabled-bg/-text (light) so roles can flip independently; add the full .dark btn ramp (disabled raised inert fill, neutral text flips light + fill ramp lightens, brand tints switch to alpha over the page). Button: disabled now uses the btn-disabled tokens, outlined fills bg-bg-page (theme-following, not white), and primary outlined/filled/text gain dark alpha tints; expose bg-page utility.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace arbitrary rounded-[Npx] with the Tailwind-aligned radius ladder across ~74 pages/components (6px→rounded-md, 8px→rounded-lg, etc.); extend design-token.cjs RADIUS (sm..4xl+full) and add the 4xl (32px) radius token in tailwind.config so the whole ladder has a class. Button medium/large radii moved onto the ladder too.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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 部门知识空间.