You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: backup restore rehydrate, server timezone API, and scoped provider reload (#34)
Restore syncs providers and reloads agents in-process; rename cron_timezone to
default_timezone with GET /api/settings/timezone; reload only impacted agents
after provider changes; align dashboard timestamps to the server timezone.
Co-authored-by: jubaoliang <jubaoliang@tencent.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Copy file name to clipboardExpand all lines: AGENTS.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -257,6 +257,20 @@ i18n/
257
257
258
258
Do **not** use gettext (`.po` files). Do **not** embed user-visible English in `infra/` when a backend i18n key exists. Expert catalog (`infra/agents/experts/`) still uses embedded `label_zh`/`label_en` in source data — out of scope unless explicitly migrating that catalog.
259
259
260
+
**Timezone (config.json):**
261
+
262
+
User-facing datetime display and cron/scheduling defaults MUST use the server timezone from `config.json` → `default_timezone` (env override `OCTOP_DEFAULT_TIMEZONE`; legacy `cron_timezone` / `OCTOP_CRON_TIMEZONE` still accepted) — not the browser's local timezone.
263
+
264
+
| Layer | Entry |
265
+
|-------|--------|
266
+
| Config |`OctopConfig.default_timezone` in `config.py`|
267
+
| API |`GET /api/settings/timezone` → `{ "timezone": "…" }` (`GET /api/cron/settings` remains a compat alias) |
268
+
| Dashboard |`useServerTimezone()`; format with `formatServerDateTime` / `formatServerIsoDateTime` / `formatMessageTime(..., timeZone)` in `dashboard/src/utils/formatMessageTime.ts`|
269
+
270
+
**Do not** use bare `toLocaleString()` / `toLocaleDateString()` / `toLocaleTimeString()` for timestamps users see without passing the server `timeZone`. Number grouping via `Number#toLocaleString()` (e.g. download counts) is fine.
271
+
272
+
**Language:** Keep the existing locale resolution (user preference → `Accept-Language` / dashboard i18n → channel hints → `DEFAULT_LOCALE`). Language is **not** a `config.json` key — do not add one unless explicitly requested.
273
+
260
274
**Workspace storage:**`infra/backend/resolver.py` resolves harness `BackendProtocol` from agent config; remote backends use `probe.py` for fast tree listing.
Copy file name to clipboardExpand all lines: dashboard/src/locales/en.json
+8-5Lines changed: 8 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -751,6 +751,7 @@
751
751
"emptyList": "No backup files yet",
752
752
"colName": "Filename",
753
753
"colSize": "Size",
754
+
"colCreated": "Created",
754
755
"colModified": "Modified",
755
756
"colActions": "Actions",
756
757
"restoreAction": "Restore",
@@ -763,15 +764,17 @@
763
764
"exportSuccess": "Backup download started",
764
765
"exportFailed": "Download failed",
765
766
"importTitle": "Import backup",
766
-
"importDesc": "Restore from a previously exported .tar.gz archive. Prefer a maintenance window; restart the server after restore.",
767
+
"importDesc": "Restore from a previously exported .tar.gz archive. Prefer a maintenance window.",
767
768
"importButton": "Choose backup file",
768
-
"importWarning": "Restore overwrites the current database and local workspaces. This cannot be undone.",
769
+
"uploading": "Uploading… {{percent}}%",
770
+
"restoring": "Restoring…",
771
+
"importWarning": "Restore overwrites the current database and local workspaces, then hot-reloads models and experts. If you also restore config/env, restart the service manually for those to fully apply. This cannot be undone.",
769
772
"importConfirmTitle": "Confirm restore",
770
-
"importConfirmBody": "Restore from “{{name}}”? Existing data will be overwritten.",
773
+
"importConfirmBody": "Restore from “{{name}}”? Existing data will be overwritten. Models and experts are hot-reloaded afterward (no service restart). If you restore config/env, restart manually for those settings to take full effect.",
"timezoneTooltip": "Server-wide scheduler timezone from config.json (cron_timezone) or OCTOP_CRON_TIMEZONE. Shared by all cron jobs.",
970
+
"timezoneTooltip": "Server-wide default timezone from config.json (default_timezone) or OCTOP_DEFAULT_TIMEZONE. Used for scheduling and dashboard timestamps.",
968
971
"sectionTask": "Task Content",
969
972
"sectionTaskDesc": "Define what to do when triggered.",
0 commit comments