9111 Commits

Author SHA1 Message Date
dolphin 2dd6ebef58 chore(frontend): block new hardcoded Chinese copy via lint (ledger #28)
- 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)
2026-07-23 12:08:35 +08:00
dolphin ae085119b8 fix(client): remove LibreChat/Deepseek brand residue from user-facing copy (ledger #29)
- locales (en/zh-Hans/ja): de-brand 4 keys (attribution, code interpreter, admin warning, API key dialog)
- mock startup config: BISHENG appTitle; drop LibreChat ToS modal, privacy/tos/help librechat.ai links, branded welcome
- AuthLayout: logo alt fallback Deepseek -> BISHENG
2026-07-23 11:37:29 +08:00
dolphin e8572ab7d2 chore(frontend): freeze deprecated deps via no-restricted-imports (ledger #5-#8)
- client: recoil (archived by Meta), react-beautiful-dnd, react-virtualized
- platform: react-query v3, xlsx, xlsx-populate, react-color, react-beautiful-dnd
- existing violations frozen into eslint-suppressions.json (shrink-only)
- AGENTS.md: client state-management rule rewritten (Recoil frozen), platform frozen-deps list added
2026-07-23 11:37:29 +08:00
dolphin 326bddf83e chore(client): align tsconfig target to ES2020 with platform (ledger #4) 2026-07-23 11:37:29 +08:00
Kinyoo 3bd226a402 style(client): align PlusMenu active state to the blue-500 brand token
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 10:01:26 +08:00
dolphin 6f38b5de6d fix(client,platform): ship full pdf.js CMap set so CID-keyed PDFs render text
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.
2026-07-22 22:27:39 +08:00
dolphin 97343e0ce9 build(frontend): strip console from production bundles (ledger #3)
- platform: esbuild drop console/debugger on build (aligns with client's terser drop_console)
- client: remove legacy PropTypes runtime validation in SpeechToText (undeclared phantom dep, broke clean-install build)
2026-07-22 22:06:47 +08:00
商航 b10629adbd Chore/frontend quality gates (#2215)
## What

简要描述做了什么改动。

## Why

为什么需要这个改动?

## How

实现方式、设计决策(如有)。

## Test

- [ ] 本地测试通过
- [ ] 114 测试服务器验证通过

## Related

- Issue/ticket:
2026-07-22 21:30:28 +08:00
dolphin e1cf4a6e98 fix(client): declare phantom deps exposed by clean CI install
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)
2026-07-22 21:23:37 +08:00
dolphin 8352b5be48 fix(platform): declare phantom deps exposed by clean CI install
- 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)
2026-07-22 21:14:55 +08:00
dolphin 306d5c1d7d chore(frontend): ESLint 9 + TS strict quality gates with frozen legacy violations
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).
2026-07-22 21:04:23 +08:00
dolphin 3e96e963d7 build(frontend): pnpm workspace + @bisheng/ui shared component library
- Convert src/frontend to a pnpm workspace (catalog-pinned shared deps,
  only-allow pnpm, npm lockfiles removed, both Dockerfiles on corepack/pnpm)
- New packages/ui (@bisheng/ui): source-shipped presentation-only library.
  First component Button (moved from client, which keeps a re-export shim so
  all call sites work unchanged), cn util, two-layer design tokens
  (tokens.css + tailwind-preset incl. dark ramp), design-token.cjs SSOT
  moved here (client re-exports it)
- Component docs move into packages/ui/docs (git-tracked); rspress site stays
  hosted in client, root/outDir repointed, button demos import @bisheng/ui;
  doc_build + playground artifacts gitignored
- pnpm-migration fixes: pin vite-plugin-node-polyfills to 0.23.0 (0.23.1
  unenv rewrite breaks CJS named-export detection), rollup/vite overrides
  matching the old npm resolutions, fs/promises + node:fs/promises stubs
- Harness rules: new packages/ui/AGENTS.md (library contract, token SSOT
  discipline, interaction rules, component definition-of-done); client
  AGENTS.md gains design-system hard rules; commands/docs updated to pnpm
2026-07-22 18:52:21 +08:00
GuoQing Zhang 24b97985fe fix(permission): restrict department admin business menus 2026-07-22 18:47:01 +08:00
dolphin d2ca23524e Merge branch 'feat/2.6.0-beta4' into feat/2.6.0-ui 2026-07-22 17:47:27 +08:00
Kinyoo c9dea89c87 chore(docs): exclude scripts/** from the docs site
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 17:41:28 +08:00
Kinyoo e80f888021 chore(docs): exclude authoring meta-doc + single-source the docs mono font stack
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>
2026-07-22 17:29:51 +08:00
Kinyoo f9de8f7e21 chore(docs): add 文案规范 (Copywriting) page to the 设计模式 sidebar group
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 15:31:12 +08:00
Kinyoo fafdf62fa3 chore(docs): unify docs-site table styling + regroup 多端适配 under 设计模式
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>
2026-07-22 15:15:16 +08:00
Kinyoo 734ef15f1f chore(docs): antd-style categorized sidebar + text-only nav states
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>
2026-07-22 11:59:51 +08:00
Kinyoo c8ac80ad8f feat(client): dark-mode Button tokens + variants (disabled/neutral/brand tints)
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>
2026-07-22 11:59:51 +08:00
Kinyoo ab74c5cc0b refactor(client): normalize border-radius to the token scale (rounded-md/lg/...)
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>
2026-07-22 11:59:50 +08:00
dolphin b33e84d4f6 Merge branch 'feat/2.6.0-beta4' into feat/2.6.0
# Conflicts:
#	src/backend/bisheng/knowledge/domain/models/knowledge.py
2026-07-21 23:00:39 +08:00
dolphin a604a88263 fix(knowledge): portal space-row right-click menu to body so it anchors to the cursor
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.
2026-07-21 22:29:43 +08:00
Kinyoo 1f09d98e72 build(client): drive the rspress docs site from the design-token SSOT
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>
2026-07-21 18:06:20 +08:00
Kinyoo 652701b897 feat(client): dark-mode neutral token ramp (arco-gray flips under .dark)
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>
2026-07-21 18:06:20 +08:00
dolphin 0bcac90da5 fix(user): stop leaking password hash and internal columns in user list
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.
2026-07-21 17:58:35 +08:00
Kinyoo 28af04253c chore(gallery): sync progress trackers with docs-site component coverage
Update GalleryApp wiring and the Button/Color/Confirm/Modal/Typography progress trackers + ProgressOverview.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 10:50:31 +08:00
Kinyoo 79789f807b fix(client): scope PluginTooltip link styles to stop a global CSS leak
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>
2026-07-21 10:50:31 +08:00
Kinyoo 8a4ad93eb9 build(client): expand rspress docs site (SSG off, more demos, spec strip loader)
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>
2026-07-21 10:50:31 +08:00
dolphin c08fb5d997 fix(knowledge): surface individually-authorized department spaces under 部门知识空间
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 部门知识空间.
2026-07-20 22:32:27 +08:00
GuoQing Zhang 4d2e159fb0 feat(square): sort by unique subscriber count 2026-07-20 17:20:36 +08:00
dolphin 0172fb2846 Merge branch 'feat/2.6.0' 2026-07-20 14:17:53 +08:00
dolphin 777db083b5 fix: update version 2026-07-20 14:01:09 +08:00
dolphin 3a28e7785c docs: remove leftover dev notes accidentally committed to README 2026-07-20 13:58:54 +08:00
Wisdomqin fe90584f6a Update README.md (#2206) 2026-07-19 19:02:17 +08:00
GuoQing Zhang e87e2655ee Feat/2.6.0 (#2205) 2026-07-19 00:01:13 +08:00
GuoQing Zhang 779d8fb87a fix: worker command error v2.6.0 2026-07-17 20:07:14 +08:00
GuoQing Zhang b9f88c2f6e fix(model): validate workbench embedding selection 2026-07-17 20:02:01 +08:00
GuoQing Zhang fe0740cf17 chore(platform): bump version to 2.6.0 2026-07-17 19:13:31 +08:00
GuoQing Zhang b4eb9fc69c fix(alembic): create missing model tables before upgrades 2026-07-17 18:25:18 +08:00
GuoQing Zhang 07cae3c1f4 chore(backend): sync lockfile project version 2026-07-17 15:45:31 +08:00
GuoQing Zhang eb14ee43b3 fix(brand): return defaults for runtime config 2026-07-17 15:44:55 +08:00
GuoQing Zhang 0cbbe37974 fix(alembic): auto-discover models for fresh databases 2026-07-17 15:39:25 +08:00
GuoQing Zhang bf05265623 fix(alembic): bootstrap schema for fresh databases 2026-07-17 14:40:28 +08:00
GuoQing Zhang 9f18aeae25 fix(alembic): merge v2.6.0 migration heads 2026-07-17 14:18:30 +08:00
GuoQing Zhang dd12964796 ci: change version 2026-07-17 11:34:46 +08:00
GuoQing Zhang 49261d5d63 fix: avoid login tenant context import shadowing 2026-07-17 10:39:51 +08:00
GuoQing Zhang d268e8e8a2 fix(user-group): clean memberships on group deletion 2026-07-16 20:41:11 +08:00
GuoQing Zhang 2c1f32a745 fix(knowledge): unify duplicate file detection 2026-07-16 20:35:54 +08:00
GuoQing Zhang bbbaeda973 fix(mark): prevent invalid assignees from breaking task list 2026-07-16 20:28:21 +08:00