WeKnora/frontend/src/components
lyingbug b4aa5bbe8d
refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376)
* 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>
2026-09-17 23:11:08 +08:00
..
GlobalCommandPalette refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
chat refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
credentials refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
css refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
icons feat(browser): polish connection settings, open tasks in a new window, and streamline prompts (#3193) 2026-09-11 21:28:58 +08:00
settings refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
AgentAvatar.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
AgentCreateContextualGuide.vue fix(models): show usage details when deletion is blocked (#2975) 2026-09-02 17:20:37 +08:00
AgentEmbedChannelPanel.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
AgentSelector.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
AgentShareSettings.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
AttachmentUpload.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
ChatAttachmentPreviewDrawer.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
ChatCitationFloat.vue feat(chat): add citation popover and chunk caching 2026-06-16 01:09:55 +08:00
ChatHeader.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
ChatReferencesDrawer.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
ChatRequestInfoButton.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
ContextualGuide.vue feat(contextualGuides): add multiple contextual guide components for agent and knowledge base creation 2026-06-03 14:42:46 +08:00
CreateTenantDialog.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
EmbedChannelPreview.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
EmbedInputField.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
EmptyState.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
FAQTagTooltip.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
GlobalCommandPalette.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
GlobalInvitationBell.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
IMChannelPanel.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
Input-field.agent-switch.test.mjs fix(chat): preserve steering continuity and composer focus 2026-09-09 20:15:23 +08:00
Input-field.browser.test.mjs refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
Input-field.focus.test.mjs fix(chat): preserve steering continuity and composer focus 2026-09-09 20:15:23 +08:00
Input-field.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
IntegrationsAgentFilter.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
KBInfoPopover.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
KBSwitcherDropdown.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
KbCreateContextualGuide.vue fix(frontend): finish knowledge base tour without creating a knowledge base 2026-09-07 11:56:00 +08:00
KnowledgeBaseSelector.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
ListSpaceSidebar.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
MentionSelector.test.ts feat(mcp)!: persist tool catalogs and add guided configuration (#3118) 2026-09-09 13:34:56 +08:00
MentionSelector.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
ModelDebugDrawer.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
ModelEditorDialog.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
ModelSelector.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
MyInvitationsDialog.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
NewUserGuide.vue feat(user-guide): update NewUserGuide and UserMenu for improved onboarding experience 2026-06-04 15:48:04 +08:00
PromptTemplateSelector.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
ProtectedResourcePreview.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
ResourceOriginBadge.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
SandboxCommandProgress.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
SandboxConfigEditorDrawer.network.test.mjs fix(sandbox): hide inbound controls and let Cube L7 rules be reordered 2026-09-03 13:34:40 +08:00
SandboxConfigEditorDrawer.template.test.mjs feat(sandbox): add a graphical desktop to session sandboxes (#3245) 2026-09-14 20:37:37 +08:00
SandboxConfigEditorDrawer.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
SandboxSkillsPanel.test.mjs feat(frontend): keep the install drawer open with live circular progress 2026-09-02 15:08:05 +08:00
SandboxSkillsPanel.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
SessionSidebarRow.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
SessionSourceFilter.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
SettingsModalShell.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
ShareKnowledgeBaseDialog.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
ShareToSpaceOrgSelect.vue feat(frontend): polish organization space UI and share-to-space panels 2026-07-23 21:03:20 +08:00
SkillFilesDrawer.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
SkillFilesPanel.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
SkillInstallTimeline.test.mjs feat(sandbox): stream live shell and install command output 2026-09-12 10:16:39 +08:00
SkillInstallTimeline.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
SpaceAvatar.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
SpotlightGuide.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
TenantModelsGuide.vue feat(contextualGuides): add multiple contextual guide components for agent and knowledge base creation 2026-06-03 14:42:46 +08:00
TenantSelector.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
UploadConfirmHost.vue feat(knowledge): enhance folder management and upload confirmation dialog 2026-08-04 20:45:29 +08:00
UserMenu.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
VectorStoreBadge.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
doc-content.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
document-preview.focus.test.mjs fix(preview): improve keyboard scrolling and fullscreen controls 2026-09-10 11:19:34 +08:00
document-preview.fullscreen.test.mjs fix(preview): align header controls and artifact cards 2026-09-10 11:48:43 +08:00
document-preview.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
empty-knowledge.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
knowledge-processing-timeline.test.ts fix: count skipped stages in parsing progress 2026-08-03 15:20:16 +08:00
knowledge-processing-timeline.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
manual-knowledge-editor.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
menu.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
modelEditorFlow.test.ts fix: improve model editor connection tests and save flow 2026-09-14 19:18:04 +08:00
modelEditorSourceState.test.ts fix(model): hide Ollama tip for remote models 2026-05-16 02:20:58 +08:00
modelEditorSourceState.ts fix(model): hide Ollama tip for remote models 2026-05-16 02:20:58 +08:00
modelSelectorClearability.test.ts fix: allow clearing optional model selections 2026-08-13 11:13:03 +08:00
modelSelectorFilter.test.ts feat(browser): polish connection settings, open tasks in a new window, and streamline prompts (#3193) 2026-09-11 21:28:58 +08:00
modelSelectorFilter.ts fix(frontend): narrow VLLM model filter to vision-capable chat models 2026-08-20 15:31:53 +08:00
picture-preview.vue feat: Enhance image preview functionality in WikiBrowser component 2026-04-22 21:17:28 +08:00
sessionGrouping.test.ts fix(session): include external users in API session group 2026-07-30 11:56:05 +08:00
sessionGrouping.ts feat(session): fork conversations from a historical user message (#3304) 2026-09-17 14:20:18 +08:00
sessionMutations.ts feat(chat): add session header actions and Markdown export 2026-07-17 16:16:35 +08:00
sessionSidebarBuckets.test.ts feat(session): gate IM/embed/API channel sessions behind admin 2026-07-20 20:31:54 +08:00
sessionSidebarBuckets.ts ci: add app frontend and docreader checks 2026-07-30 14:13:15 +08:00
sessionSidebarSourceFilter.test.ts feat(frontend): implement session source filter component for improved session management 2026-06-24 10:30:10 +08:00
sessionSidebarSourceFilter.ts feat(frontend): implement session source filter component for improved session management 2026-06-24 10:30:10 +08:00
sessionTitleEdit.test.ts feat(frontend): add inline session title rename in sidebar 2026-07-09 00:10:11 +08:00
sessionTitleEdit.ts feat(frontend): add inline session title rename in sidebar 2026-07-09 00:10:11 +08:00
share-to-space-panel.less refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
share-to-space-panel.overlay.less refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00
upload-mask.vue refactor(frontend): style consistency pass — shared shells, tokens, unified confirmations (#3376) 2026-09-17 23:11:08 +08:00