Replace limit-truncated listing with real server-side paging
(LIMIT/OFFSET plus a shared count query) behind Page envelopes:
tool/list accepts a nested Pages block and audit/list takes
current/size params, both keeping the legacy limit as a compatibility
page size. The frontend configs forward pager state and consume
{records, total} instead of faking a single page; the assignment
drawer keeps its full-catalog semantics with one 500-row page (the
service cap). Adds a mapper XML grammar gate and audit page/count
symmetry tests.
Co-Authored-By: Claude <noreply@anthropic.com>
Extract the header language switch into a reusable AppPreferences
component and add a light/system/dark theme toggle beside it, backed by
the persisted app store theme mode. Use the component in both the
console header (compact) and the login page (surface variant) so the
public page obeys the same theme contract as the workspace.
Tokenize the login page palette in theme.scss with dark-mode twins,
switch the login validation rules to computed form rules so messages
follow locale changes, and extend the layout component test and the
login/responsive e2e specs for the new controls.
Co-Authored-By: Claude <noreply@anthropic.com>
Bump pnpm to 11.24.0 and refresh element-plus, axios, dayjs, dompurify,
marked, pinia, vue-i18n, playwright, typescript-eslint, eslint, sass,
vite and vitest within their minor lines, and widen the pnpm-workspace
onlyBuiltDependencies ranges accordingly.
Keep typescript on ~6.0.3, vue on ^3.5.40 and happy-dom on ^20.11.0:
typescript 7 drops the ./lib/tsc subpath vue-tsc still resolves, vue
3.5.41 makes compiler-sfc require filesystem access for imported prop
types under the vitest environment, and happy-dom 20.11.6 changes the
execCommand clipboard behaviour the utils suites assert on.
Co-Authored-By: Claude <noreply@anthropic.com>
- add JSDoc to useEntityListPage, useEntityNames, usePagedList, and the four Pinia stores
- add JSDoc to 39 utils exports across thingModelFormat, formRule, validation, date, json, pointFormat, and searchParam utilities
- verified: pnpm check and pnpm lint:check pass
Remove the unused highlight.js plugin and four dead dependencies, switch Element Plus styles to per-component imports, split marked/dompurify/vue-element-plus-x into a lazy agentic-vendor chunk, and restore the 500 kB chunk warning limit.
Fix calcDate second remainder, drop dead storage helpers, follow the i18n locale for numeric formatting, rename order to sortAsc and expand abbreviated identifiers, and remove the unused English dashboard empty default.
Remove the unused interval store and its test, the duplicate agentic session/message seed block, and consolidate AUTO_REFRESH_INTERVAL plus PRINCIPAL_TYPE_OPTIONS into shared constants.
Route meta titles become i18n keys resolved in the guard, the axios interceptor and agentic store reuse locale messages instead of hardcoded English, leftover labels and copy hints switch to t(), and the route/sidebar aliases merge into one source.
Clear only the auth storage keys instead of wiping localStorage and sessionStorage when an SSE request returns 401, matching the axios interceptor contract.
Default the R envelope to unknown so bare wrappers surface their data shape, remove the | string tail that voided alarm/attribute unions, add explicit generics to every dashboard/point/info wrapper, and move the alert row types plus RangeKey to a single dashboard source. Also fix mock seeds to match backend enums (PENDING, DINGTALK_BOT).
Upload the import file as a real multipart FormData part (the backend contract is @RequestPart), render operateTime on the operation-time detail rows, and stop double success toasts for add/import flows.
R2b of docs/design/storage-abstraction.md §3:
- PostgreSQL seed: the three driver-lease sequences retire. The fencing
token and assignment version default to 1 and advance row-locally —
per-device / per-driver monotonicity is the property the checks rely
on, which the global sequences only delivered incidentally, and MySQL
has no sequence objects. The three statement-level revision triggers
(transition tables + INSERT .. ON CONFLICT, none of which MySQL can
express) collapse into one row-level function with row-local +1 upserts
— a shape both engines share.
- MySQL seed under dc3/dependencies/mysql/initdb/ (00-06), derived by
dc3/dependencies/mysql/pg2mysql_seed.py: schemas become databases,
TIMESTAMPTZ becomes DATETIME(6), TEXT/JSON literal defaults become
expression defaults (MySQL 8 refuses literal defaults on BLOB/TEXT/
JSON), operate-time plpgsql triggers become the ON UPDATE column
attribute (explicit SETs keep winning), the revision family becomes
row-level DELIMITER triggers, keyed TEXT columns widen to VARCHAR(191),
partial indexes drop, and the embedded-JSON seed values load under
NO_BACKSLASH_ESCAPES (MySQL string literals eat the backslashes the
escaped-JSON content values depend on; PostgreSQL does not). 05 is
hand-maintained: only the dc3_point_latest projection — a MySQL core
requires an external time-series store, so the hypertable and cagg DDL
have no counterpart by design.
- Compose: the optional stack gains a mysql:8.4 service (utf8mb4, seed
mounted at docker-entrypoint-initdb.d, healthcheck); the app stack
passes DC3_DB_TYPE through.
Verified by loading all seven files into a fresh mysql:8.4 container —
zero errors, five databases, table counts aligned with the PostgreSQL
seed (manager 24 incl. common, auth 24, data 12, agentic 6, history 1),
and the revision trigger proven live: insert bumps the owning driver's
revision to 1, an enable_flag flip bumps it again to 2.
The static demo's menu/user data diverged from the backend seed
(dc3/dependencies/postgres/initdb/02-iot-dc3-auth.sql):
- menuTree: switch each node from the legacy content.title i18n key to
the authoritative content.titles {zh,en} map, and pull icon/menuName/
url for all 48 nodes from the dc3_menu seed (resolveMenuTitle already
prefers content.titles). Leaf nodes now carry icons too.
- auth seed: align the dc3 principal/user with the seed (displayName/
nickName "DC3", phone, email); demo users ops/guest retained.
Verified: type-check, eslint, and 158 unit tests green.
header_logo was 60px — the full header height — so the logo dominated the
bar. Shrink it to 40px and add an "IoT DC3" brand title next to it in the
theme color (var(--el-color-primary)).
Prose rewrapping and table reflow from a project-wide markdown pass;
no content changes. Also reverts two formatter mistakes: restores
MD5(password) in dc3-web/AGENTS.md and drops spurious spaces after
CJK punctuation in README.zh.md / README.ja.md.
Covers root guides (AGENTS/CONTRIBUTING/SECURITY/README.*), module
READMEs across dc3-api/center/common/driver/e2e/gateway, the nginx
guide, dc3/doc/{README,TITLE}.md, and dc3-web docs.
AI assistant (was hidden in mock mode):
- Intercept /api/v3/agentic/chat/completions via a fetch mock (src/mock/fetch.ts); the assistant streams over raw fetch, not the axios adapter
- Keyword-aware scripted replies (temperature/energy/driver/point) emitting reasoning traces, text deltas and visualizations (line/area/column/bar/donut/stat/scatter)
- Show the assistant in mock builds (drop the isMock gate in Layout)
- Seed 4 multi-turn sessions (12 messages) with chart-bearing assistant replies + reasoning
Dashboard enrichment (home cards were sparse):
- Register the 8 insight endpoints the cards call (stream/device-stats/driver-stats/top/alert-aging/silent-sources/latency/activity) with realistic seed data so LiveDataFeed/AnalyticsTabs/SlaBadge/LatencyChart/ActivityHeatmap render content
Entity data (was thin):
- Drivers 8 -> 17, profiles 6 -> 14, points 18 -> 59, devices ~15 -> 65
Verification: vue-tsc green / 158 unit tests pass / build:mock succeeds
Realistic mock:
- Generic CRUD registrar (crud.ts) + mutable in-memory db: full create/update/delete persistence for all entities
- Four structured seeds (auth/manager/data/agentic): real business data for 27 modules replacing the generic fallback stubs, with consistent relations
- Point-value 24h history curve (timeseries) + alarm/event/command history
- settings/business/agentic handlers covering all settings modules and special endpoints (tree/join queries)
Login page + header icons:
- Drop mock-mode pre-seeded token in main.ts and mock/index.ts so the demo starts at the login page (previously landed straight on home)
- Add Setting icon to the settings top-level menu (menuTree) and render icons on Layout dropdown sub-items (previously text-only)
Types: add [key:string]:unknown index signatures on entity interfaces in agentic.ts/common.ts (matches the existing DriverRecord convention)
Verification: vue-tsc green / 158 unit tests pass / build:mock succeeds / no internal address leaked in dist