Skip to content

Improve web logging and add regression tests for simplified deployment#8

Merged
jimmieme merged 1 commit intoao-space:devfrom
jimmieme:dev
Feb 6, 2026
Merged

Improve web logging and add regression tests for simplified deployment#8
jimmieme merged 1 commit intoao-space:devfrom
jimmieme:dev

Conversation

@jimmieme
Copy link
Member

@jimmieme jimmieme commented Feb 6, 2026

Summary

This PR improves observability and test coverage of space-web for the
simplified deployment mode (LAN-first, minimal dependency path).

What Changed

  • Introduced a centralized logger with sensitive-field redaction:
    • src/utils/logger.ts
  • Added helper modules to make request behavior deterministic and testable:
    • src/api/network.helpers.ts
    • src/pages/login/switchLogin.helpers.ts
  • Refactored key flows to use structured logs:
    • login flow (core.vue, qrLogin.vue, switchLogin.vue)
    • network request path (src/api/network.js, src/api/rawrequest.ts)
    • upload path (src/business/fileUp/sequelUpUtilNew.ts)
  • Added regression unit tests:
    • tests/logger.test.ts
    • tests/network.helpers.test.ts
    • tests/network.error-routing.test.ts
    • tests/gateway.call.helpers.test.ts
    • tests/switch-login.helpers.test.ts
  • Updated deployment/runtime support files:
    • docker-entrypoint.sh
    • nginx.conf.template
    • src/config/networkConfig.ts
    • src/main.js
  • Updated package.json and package-lock.json for test/runtime dependencies.

Why

Recent debugging showed that web failures in simplified mode were hard to trace
due to inconsistent logs and low test coverage in critical routing/error paths.
This change standardizes logs, reduces noisy console output, and adds targeted
regression checks.

Validation

  • npm run test:unit passed (13 tests).
  • npm run build passed.
  • Web smoke checks passed (/, /space/status, /space/v1/api/gateway/ version/box/current).

Impact

  • Scope is space-web only.
  • No backend API contract changes.
  • Main impact is improved diagnosability and safer behavior during LAN/
    simplified deployments.

Generated-by: Codex

@jimmieme jimmieme merged commit a3281ae into ao-space:dev Feb 6, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant