33 Commits
Author SHA1 Message Date
pnokerandClaude Code 3fb43c4239 feat(web): unify three-terminal control density and close audit defects
Land the v7 three-terminal UX decision: drop the width/pointer-based
44px touch enlargement so one 32px density holds across desktop,
tablet, and mobile, and rebuild entity pages on a responsive record
list (ResponsiveRecordList + EntityMobileCard + per-entity mobile
summaries). Tighten the nginx security headers (CSP frame-ancestors
'none', X-Frame-Options DENY) to match the static e2e server.

Complete the dc3-web audit remediation, including the remaining LOW
items from docs/dc3-web-low-defects-handoff.md: streaming-safe
message loads in the agentic store, mock menu reparent cycle
rejection, paged-list page clamping, fetch/axios mock request
normalization, per-table attribute catalogs, post-flush alarm
watchers, rowKey-agnostic delete state, localized card text
fallbacks, and e2e-server port fail-fast.

Gate: vue-tsc, eslint, vitest 687 passed, responsive e2e 64 passed.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-07 19:33:17 +08:00
pnoker 031deb4453 feat(web): adopt family login atmosphere and copyright footer
Replace the Particles canvas with LoginAtmosphere, the warped interactive
grid + logo-dot silhouette shared with the dc3.site family sites, and add
an AGPL copyright footer with the platform tagline. Drop the 48px grid
overlay from the login background so the atmosphere carries the scene.
2026-09-04 09:38:38 +08:00
pnoker 86a9ae1399 feat(web): unify brand lockup, capsules, and account menu
- Extract a shared BrandLockup (logo, gradient wordmark, AGENTIC tag,
  signal line) used by both the header brand capsule and the login page
- Add a shared glass-capsule SCSS recipe so the header capsules and the
  login brand pill keep identical geometry and glass decoration
- Align the login page with the workspace font stack
- Reduce the account trigger to an avatar and move the username into a
  themed identity dropdown with divider; style the popper with dc3
  tokens so light and dark themes both follow the system theme
- Point the About action at the live site domain (https://dc3.site)
2026-09-02 02:22:02 +08:00
pnoker eae86b58fc refactor(storage)!: unify platform persistence on reactive postgresql
- migrate auth, manager, data, and agentic persistence to R2DBC
- hard cut pagination, facade, gateway, web, and CLI contracts
- remove legacy database and TSDB adapters and document validation gates

BREAKING CHANGE: platform persistence now requires PostgreSQL 18 with TimescaleDB and the new reactive API contracts.
2026-09-01 22:03:16 +08:00
pnokerandClaude fe9384864a feat(web): add theme and language preferences to console and login
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>
2026-08-27 09:40:59 +08:00
pnoker 01ff3a0b38 fix(web): initialize mock before router navigation 2026-08-26 09:44:06 +08:00
pnoker ec2310fa9b feat(web): unify responsive console experience 2026-08-26 09:43:45 +08:00
pnoker a7ca489b9b style(repo): reformat java, xml, yaml, markdown and frontend sources 2026-08-25 21:27:49 +08:00
pnoker 0727708f25 test(web): extend three-terminal gate and add breakpoint guardrail 2026-08-25 21:02:02 +08:00
pnoker 769d1cb977 style: apply repository-wide formatting
- expand single-line Javadocs to multi-line blocks, rewrap Markdown prose, and reflow POM, YAML, and TypeScript formatting
- formatting only: no Java code lines changed, no build-file semantics changed
- verified: backend compile and check_documentation.py pass, pnpm check and pnpm lint:check pass, and the dc3 YAML files parse
2026-08-25 13:35:00 +08:00
pnoker 6ee8974403 test(web): add three-viewport e2e gate and align playwright 2026-08-24 19:39:30 +08:00
pnoker 802f538794 feat(web): add design tokens and reactive breakpoint system 2026-08-24 19:39:05 +08:00
pnoker 03492ab5e9 refactor(web): polish naming, storage and date utilities
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.
2026-08-24 17:50:20 +08:00
pnoker 2b727bca12 chore(web): drop dead stores, seeds and centralize constants
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.
2026-08-24 17:50:18 +08:00
pnoker 5555b26515 fix(web): repair device import upload and detail timestamps
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.
2026-08-24 17:48:25 +08:00
pnoker 90a7db4d6b merge: integrate upstream deployment docs and validation targets 2026-08-19 14:30:34 +08:00
pnoker dddf2e8690 test: enforce truthful coverage and behavioral quality 2026-08-18 23:24:58 +08:00
pnoker aec6ebfc76 refactor(logging): standardize application logging 2026-08-18 08:14:52 +08:00
pnoker b02d8f81fc refactor!(web): parse identifiers as strings and drop json-bigint
BREAKING CHANGE: frontend identifier types converge to string and the json-bigint dependency is removed; the backend now emits string ids.
2026-08-17 21:37:49 +08:00
pnoker 6c9149f9b2 feat(web): enrich the localized Industrial AI mock experience 2026-08-12 01:04:47 +08:00
pnoker 50c6de9438 docs: rewrap project guides and README files
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.
2026-08-09 18:44:55 +08:00
pnoker 2da8b2aa2b style(web): reformat mock seed, views and components
Pure formatting from a project-wide prettier/eslint pass: object
expansion, Vue attribute ordering, .catch() block expansion, import
ordering and type-import placement. No logic or behavior change.

- src/mock/**: seed object expansion, db import sort, crud/dispatch/
  query/response/timeseries type spacing, fetch dataset expansion
- src/views/**: Device/Point/Profile .catch() expansion, import sort
- src/components/**: AgenticAssistant/CardShell/Layout attr ordering
- src/api, src/config, src/main, index.html: spacing/meta ordering

Verified: vue-tsc type-check, eslint, and 158 unit tests green.
2026-08-09 18:44:17 +08:00
pnoker a73ba1267a refactor(web,auth): httpOnly cookie auth + CSP + dedup + type debt
- token: httpOnly+Secure+SameSite cookie (backend Set/Clear + filter Cookie-first read), frontend axios drops X-Auth-Token, auth store uses sessionStorage flag, router guard checks flag
- security: CSP + nosniff + Referrer-Policy in index.html; delete dead getCookies/setCookies/removeCookies; remove Base64 obfuscation from storageUtil
- fix: 24 double-notification .catch failMessage removed (interceptor handles); storageUtil boolean get/set asymmetry fixed
- types: DeviceDetail/profile-detail/device-edit {} as any -> Partial<DeviceRecord>/DriverRecord/ProfileRecord
- dedup: API CRUD factory (11 modules), i18n confirmDelete interpolation (54 lines removed), CardShell unified + shared form-width mixin

Verification: vue-tsc green / 158 unit tests pass / mvn compile green
2026-08-08 18:40:58 +08:00
Henry Zhang 84110719ee feat(web): realistic mock demo + login-page entry and header icon fixes (#201)
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
2026-08-07 22:48:09 +08:00
Henry ZhangandClaude Fable 5 7802eeb999 feat(web): static mock demo deployable to demo.dc3.site (#199)
* feat(web): complete static mock demo for GitHub Pages

- register core/dashboard/dictionary handlers + seed data (driver/device/
  profile/point, dictionaries, dashboard stats/topology/alerts)
- fix router-guard timing: pre-seed auth at main.ts top level before router
  install, since the initial navigation runs as a microtask ahead of the
  async mock-chunk import
- hide agentic assistant in mock mode (its chat streams over raw fetch and
  bypasses the axios adapter)
- assetUrl helper for subpath-safe public assets
- GitHub Pages deploy workflow + public/CNAME (demo.dc3.site)
- unit tests covering the mock adapter

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(web): commit mock core handler skipped by core.* gitignore

The repo-root `core.*` rule (meant for JVM crash dumps) silently skipped
dc3-web/src/mock/handlers/core.ts during `git add`, so the PR build failed
type-check with "Cannot find module './handlers/core'". Force-add the file
and add a negation exception so it can't be dropped again.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* test(web): drop `as never` cast in mock-adapter test

The AI guardrail forbids double-assertion / never-cast type laundering.
Use the real AxiosRequestConfig type and a single boundary cast to R
(the interceptor unwraps the envelope) instead of `request(config as never)`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-06 21:18:10 +08:00
Henry Zhang d06abff597 chore(docs): move docs site to standalone pnoker/iot-dc3-docs repo (#177)
* chore(docs): move docs site to standalone pnoker/iot-dc3-docs repo

The VitePress docs site now lives in pnoker/iot-dc3-docs and serves docs.dc3.site from there. Remove the in-repo docs/ and all docs-only build/deploy wiring so nothing dangles.

- delete docs/ (source moved to pnoker/iot-dc3-docs)

- delete .github/workflows/docs.yml (deploy owned by iot-dc3-docs)

- drop npm /docs dependabot block; clean codeql/.gitignore docs paths

- remove Makefile docs-* targets

- relocate AI testing policy into dc3-web/tests/ so the required Web guardrail test is self-contained (was reading ../docs/...)

- rewire README image refs (7 READMEs) and in-repo doc links (README.ai.md, AGENTS.md, dc3/doc/README.md) to https://docs.dc3.site / the new repo

dc3/doc/{TITLE,CHANGE,USAGE}.md STAY - release tooling (make changelog, docker-ci) regenerates them; the docs repo snapshots them.

* fix(docs): repair pre-existing broken doc links found during migration

- 8 READMEs: /en|zh/introduction/technology-stack -> /en|zh/development/technology-stack (page lives under development/, not introduction/)

- dc3-web/tests/README.md: ../docs/test-debugging.md (missing) -> https://docs.dc3.site/en/frontend/test-debugging
2026-08-06 14:54:17 +08:00
Henry ZhangandClaude Fable 5 e2527af78d fix(agentic): run markdown sanitize test under jsdom (#176)
DOMPurify does not strip <script>/on* handlers under happy-dom (the
default vitest environment), so the "strips <script> tags" assertion
has been failing on main since the sanitizer switched to DOMPurify.
Production is unaffected — real browsers sanitize correctly. Pin this
single test file to jsdom via a per-file environment annotation and add
jsdom as a devDependency; all other tests stay on happy-dom.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-06 12:39:45 +08:00
pnokerandClaude Fable 5 829e82fe28 fix(web): restore frontend testing guardrails doc and fix test path
The doc was moved from dc3-web/docs/ to docs/zh/frontend/ then deleted
as an "orphan", but ai-guardrails.test.ts still read the old path,
breaking the quality gate on every frontend PR. Restore the doc and
point the test at its current location.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 20:35:43 +08:00
pnoker d47d125af0 style(web): reformat frontend with IDEA code style
Apply IDE formatting across all Vue, TypeScript, SCSS and test files.
No logic changes — whitespace, quotes and brace style only.
2026-07-10 00:02:51 +08:00
pnokerandClaude afdac8930a feat(dc3-web): add unified logger and apply prettier formatting
- Add src/utils/log.ts: environment-aware logger that gates debug/info
  to dev mode while warn/error always emit, with [dc3] prefix
- Wire logger into main.ts error handler
- Apply prettier formatting: 2→4 space indentation (index.html),
  array element line breaks (tsconfig.json), generic type formatting
  (device.ts), and trailing slash cleanup

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-09 12:52:10 +08:00
pnoker a855c6f389 style(dc3-web): apply updated prettier bracket spacing and endOfLine 2026-06-29 17:50:32 +08:00
pnoker 7bfc9c4a87 test(web): update component test assertions for MiniAreaChart and ThingsCardActions 2026-06-28 19:57:58 +08:00
pnoker 2e4645e606 Add 'dc3-web/' from commit '0c3c7a157c3f003d5d8a8077c3e3850069d19747'
git-subtree-dir: dc3-web
git-subtree-mainline: e133f5a027
git-subtree-split: 0c3c7a157c
2026-06-28 09:45:33 +08:00