* feat(system): platform user management — list, enable/disable, reset password, role toggle
Adds a SystemAdmin-only user management panel under platform settings
(System global -> Access). The backend already had repository primitives
and promote/revoke endpoints; this wires the missing service/handler/route
for listing and account-status changes and adds the UI.
Backend
- New GET /system/admin/users: paginated, cross-tenant user list
(offset/limit, limit capped at 200), serialised via ToUserInfo so password
hashes are never exposed; has_more derived with a limit+1 fetch (no COUNT).
- New POST /system/admin/users/status: enable/disable an account.
Disabling revokes all of the user's tokens immediately. Service guards
reject self-disable and disabling the last active system administrator.
- ValidateToken now re-checks is_active on every request, so a disabled
account cannot keep using a previously issued access token.
Frontend
- UserListDialog: table with status/role tags, pagination, in-page
username/email filter, enable/disable and reset-password actions, and
one-click system-admin promote/revoke (reuses existing endpoints) with
confirmation prompts. Reset-password dialog is a sibling (not nested)
dialog so close/cancel/overlay all work.
- All new strings are i18n keys under system.globalSettings.userList in
all six locales (en-US, zh-CN, zh-TW, ja-JP, ko-KR, ru-RU).
Tests: handler unit tests for list pagination/redaction/limit-cap and for
status-change success/guard/404 paths; existing handler/service/router
suites pass.
Co-authored-by: MOSS Agent <noreply@example.com>
* fix(system): make account status changes atomic and validate requests
* refactor(system): streamline settings and add dedicated user management tab
* fix(system): resolve user management CI lint findings
* fix(system): preserve account status during ordinary user updates
---------
Co-authored-by: desksk <26273255+desksk@users.noreply.github.com>
Co-authored-by: MOSS Agent <noreply@example.com>
Co-authored-by: wizardchen <wizardchen@tencent.com>
* refactor(frontend): batch 1 of style consistency cleanup
- theme.css: alias --td-font-family-mono to --app-font-family-mono so the
29 monospace call sites follow the user's code-font setting
- replace 115 hardcoded rgba(7,192,95,x) brand tints with
color-mix(in srgb, var(--td-brand-color) N%, transparent) so they track
the dark-mode brand color
- strip 358 dead var(--td-*, fallback) fallbacks (tokens are guaranteed by
theme.css); keep the 3 undefined tokens untouched
- menu.vue: drop 9 unreferenced style blocks; remove TencentSans font file
and its global import
- AgentStreamDisplay: drop 6 unused keyframes; move the teleported wiki
drawer styles into components/css/wiki-graph-drawer.less imported by
both chat and WikiBrowser so styling no longer depends on load order
- creatChat: remove four !important fixed-width media queries; chat root no
longer forces font-size: 20px
- list pages: create buttons use native theme="primary" (drops the purple
gradient on AgentList); header-action-btn no longer needs !important
- add styleGuard.test.mjs ratchet test (brand rgba, legacy blue, token
fallbacks, z-index !important, raster icons)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* refactor(frontend): unify destructive confirmations on useConfirmDelete
- useConfirmDelete now uses the danger dialog theme with a red confirm
button; it is the single entry point for delete/leave confirmations
- AgentList, KnowledgeBaseList and OrganizationList drop their hand-rolled
del-*-dialog (span-as-button, circle.png) in favour of useConfirmDelete;
circle.png asset removed
- FAQ single-entry delete gains a confirmation (it deleted immediately);
new knowledgeEditor.faq.confirmDelete key in all five locales
- VectorStore/StorageBackend delete dialogs and the generated-question
popconfirm use the danger theme like the rest of the app
- style guard raster-icon baseline lowered to 10
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* feat(frontend): shared modal shell with Esc, overlay close and unsaved guard
Add composables/useModalShell and wire it into the four full-screen
settings-style modals (Settings, AgentEditorModal,
OrganizationSettingsModal, KnowledgeBaseEditorModal):
- Esc closes the modal everywhere (previously only Settings); it defers
to any open TDesign dialog/drawer/popup and to the agent editor's own
placeholder popups
- overlay click closes everywhere (Settings gains it)
- editors snapshot their form after load/save; closing with unsaved
changes now asks "有未保存的更改 / 放弃更改 / 继续编辑" instead of
silently discarding
- new common.unsavedChanges.* keys in all five locales
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* fix(frontend): mark instant-effect sections in the knowledge base editor
Share, data source and activity sections apply changes immediately, but
the editor footer still showed Cancel / Save, so users either re-saved
or assumed Cancel would undo. Those sections now show an "applies
immediately" note with a single Close button; other sections keep the
Cancel / Save footer. New knowledgeEditor.footer.instantEffect key in all
five locales.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* refactor(frontend): consistent success wording and confirm labels (zh-CN)
- toasts use the "已X" form everywhere: 25 zh-CN values such as
保存成功 / 删除成功 / 智能体创建成功 become 已保存 / 已删除 / 已创建智能体;
common.copySuccess now reads the same as common.copied
- confirm buttons in dialogs and popconfirms use the bare verb
(删除 / 重置 / 移除 / 应用 ...) instead of 确认X; dialog titles keep 确认删除
- GeneralSettings no longer pops a bare "成功" toast after theme / font /
font-size changes, which are self-evident and applied instantly
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* refactor(frontend): extract SettingsModalShell for the four settings-style modals
Settings, AgentEditorModal, OrganizationSettingsModal and
KnowledgeBaseEditorModal each carried a copy of the same overlay / panel /
sidebar-nav / footer markup and ~20 CSS blocks, already drifting
(1000/1080/1100px widths, three shadows, different nav paddings).
components/SettingsModalShell.vue now owns that chrome: one 1080x780
panel, grouped nav with badges, optional loading overlay, footer with a
note slot and an actions slot. Consumers keep only their content and
wire `@close` to their useModalShell.requestClose. Settings keeps its
sub-menu nav through the `nav` slot; OrganizationSettingsModal keeps its
image icon through the `nav-icon` slot.
Net: -1025 lines across the four modals.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* refactor(frontend): shared resource-card mixins and EmptyState for list pages
KnowledgeBaseList, AgentList and OrganizationList each re-declared the
same 136px card (border, radius, shadow, hover, header/title/description/
bottom, more-button reveal, feature badges) with small drifts, plus a
copy of the empty-state block using the upload illustration for every
kind of emptiness.
- components/css/resource-card.less: .resource-card(),
.resource-card-grid() and .resource-feature-badge() mixins; the pages
keep only their own variants (type gradients, favourite star,
decoration). More-buttons stay visible on touch devices.
- components/EmptyState.vue: icon / title / description / actions; the
11 empty states now use a matching TDesign icon instead of upload.svg
- badge accent colours move from hard-coded old-blue / material orange /
pink / slate rgba to color-mix over theme tokens (new
--app-accent-purple in theme.css); style guard legacy-blue baseline
drops from 40 to 18
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* refactor(frontend): shared settings-section mixins for header, row, info, control
25 settings/system/integration pages each re-declared .section-header,
.setting-row, .setting-info and .setting-control with five different
header margins (18-32px), three description sizes and assorted paddings.
components/css/settings-section.less now provides
.settings-section-header() / .setting-row() / .setting-info() /
.setting-control() / .setting-save-state(); pages keep only their
deliberate deviations (e.g. Ollama's column control, TenantInfo's fixed
label column). PlatformAPIKeys' style block switches to less so it can
use the mixins. Net -570 lines.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* refactor(frontend): provider-card mixins, dark-safe vendor badges, one spin keyframe
- components/css/provider-card.less: .provider-card() /
-interactive() / -add() / -badge() / -badge-color() / -body() /
-header() / -title() / -subtitle() / -more() shared by the model,
vector store, web search, storage, parser and sandbox settings cards;
MCP and skill cards reuse the 26px badge variant
- vendor badge colours are now `.provider-card-badge-color(#hex)`: the
foreground is mixed 75/25 with the text colour so it stays readable in
dark mode, the background is the same colour at 12% alpha
- 18 copies of a rotate-360 keyframe (steer-spin, chat-header-spin,
sandbox-terminal-spin, ...) collapse into a global `wk-spin` in
theme.css; 23 files updated, one source test adjusted
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* refactor(frontend): use TDesign password toggle for API keys; align chat toolbar buttons
- ModelEditorDialog: the API key field is a plain t-input type="password"
and relies on TDesign's built-in show/hide eye instead of a hand-rolled
suffix toggle, matching every other secret field in the app
- chat answer toolbar buttons are 28px with 6px radius, the same size as
the user-message actions and the input control bar
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* refactor(frontend): app design tokens, tokenized literals, global TDesign overrides
theme.css gains an app-level token set derived from the de-facto scale
already used in the codebase, so values do not change:
--app-radius-{xs,sm,md,lg,xl,pill} (4/6/8/10/12/999px)
--app-text-{2xs..4xl} (10..24px)
--app-space-{1..10} (4px grid)
--app-motion-{instant,fast,base,slow} (120/150/200/300ms)
--z-{sticky,dropdown,modal,drawer,popover,toast}
A codemod mapped 675 border-radius, 1904 font-size and 551 transition
duration literals in 191 files onto those tokens (value-preserving; five
source-text tests now accept either form).
assets/theme/tdesign-overrides.less holds global-intent TDesign
overrides; its `.wk-popover` skin replaces six per-file copies of the
blurred popover panel (TenantMembers x2, UserProfile,
OrganizationSettingsModal, systemAdminDialog.less,
share-to-space-panel.overlay.less) without !important.
styleGuard ratchets now also cover radius / font-size / motion literals,
`transition: all`, total `!important` and z-index !important.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* fix(frontend): keep symmetric side insets for the chat column on narrow viewports
.chat had padding 0 0 20px 20px so the scrollbar could sit on the content
edge, but that also left the message list and input box flush against the
right edge whenever the viewport was narrower than 960px + sidebar. The
inset now lives on .msg_list and .input-container (--chat-content-inset,
20px each side, max-width 960px + insets); the scroll container still
spans the full column so the scrollbar stays on the edge. Wide layouts are
unchanged (960px content, centered).
* chore(frontend): strip trailing whitespace flagged by pre-push
* test(frontend): accept tokenized font-size and shell-rendered loading overlay
Two source-text assertions only ran in CI (Node 24 discovers .test.ts,
local Node 20 does not):
- ChatQuestionMinimap: the 13px preview font is now var(--app-text-md)
- modelUsageDetails: the editors' loading overlay is rendered by
SettingsModalShell via :loading instead of an inline v-if
Both regexes now accept either form.
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
* fix(system): keep one-time create-user passwords from being discarded
Escape leaked to the Settings modal, and a double submit could replace a
201 reveal with an idempotent 200. Show the password in plaintext and
distinguish create vs retry via an idempotent body flag.
* i18n(system): update copy button and success message for account details
Changed the labels for the copy button and success message across multiple languages in the localization files to reflect the new terminology for copying account details instead of just passwords. This update enhances clarity for users when interacting with the Create User dialog.
* i18n(system): add createUser strings for SystemAdmin dialog
* ui(system): add Create user dialog to the Access settings tab
Wire the unused createSystemUser API to a third row in the SystemAdmin
Access section. The dialog (CreateUserDialog.vue) has two views:
- Form: username, email, and an auto-generate toggle that reveals
new/confirm password fields when off.
- Reveal: one-time generated password the admin must acknowledge;
overlay click, Esc, and the close button are disabled until then.
Also:
- The idempotent 200 OK path (no generated_password) closes with its
own success toast.
- The teleported dialog shell is shared via systemAdminDialog.less.
- Password policy comes from upstream's @/utils/passwordPolicy
(complex-password aware) rather than a local shared module.
* i18n(audit): register system.user_created for the SystemAuditLog