Remove the API relay link and the ESP32 device feature

Two pieces of upstream promotion came out of this deployment.

The sidebar "apiRelay" tab only opened a registration page on a third-party
site, so it goes with no replacement.

The circuit badge next to Settings was not what it looked like. It opened an
ESP32 device manager: add a device, show LAN status, remote connect/disconnect,
rename, delete, backed by six REST routes and an mcu_devices table. The purchase
button inside that dialog was the promotional part; the rest was real device
management. Since the hardware is out of scope here, the entire feature is
removed rather than just the link that pointed upstream - UI entry, client API,
routes, controller, store, schema, locale strings, and the one GlobalAgentServer
method that only existed to answer its status column.

Table creation is dropped but no DROP TABLE was added, so an already-provisioned
database keeps its rows as harmless orphans instead of losing data on upgrade.

DevicesView and the hermes.devices route are untouched: that is LAN device
discovery, a separate feature.

AGENTS.md now records the removal so the badge does not come back.
This commit is contained in:
2026-10-19 01:32:51 +08:00
parent 3c963bb1d9
commit 77b1858163
22 changed files with 49 additions and 1405 deletions
-18
View File
@@ -119,8 +119,6 @@ describe('Database Schema Synchronization', () => {
WORKFLOW_RUNS_SCHEMA,
WORKFLOW_RUN_NODE_SESSIONS_TABLE,
WORKFLOW_RUN_NODE_SESSIONS_SCHEMA,
MCU_DEVICES_TABLE,
MCU_DEVICES_SCHEMA,
} =
await import('../../packages/server/src/db/hermes/schemas')
@@ -183,22 +181,6 @@ describe('Database Schema Synchronization', () => {
expect(workflowRunNodeSessionCols.has('session_id')).toBe(true)
expect(workflowRunNodeSessionCols.has('status')).toBe(true)
expect(workflowRunNodeSessionCols.has('agent')).toBe(true)
expect(tableExists(db, MCU_DEVICES_TABLE)).toBe(true)
const mcuDeviceCols = getTableColumns(db, MCU_DEVICES_TABLE)
expect(mcuDeviceCols.size).toBe(Object.keys(MCU_DEVICES_SCHEMA).length)
expect(mcuDeviceCols.has('id')).toBe(true)
expect(mcuDeviceCols.has('name')).toBe(true)
expect(mcuDeviceCols.has('device_code')).toBe(true)
expect(mcuDeviceCols.has('is_official')).toBe(true)
expect(mcuDeviceCols.has('created_at')).toBe(true)
db.prepare(`INSERT INTO "${MCU_DEVICES_TABLE}" (name, device_code, is_official) VALUES (?, ?, ?)`)
.run('MCU 1', 'device-code-1', 1)
expect(() => {
db.prepare(`INSERT INTO "${MCU_DEVICES_TABLE}" (name, device_code, is_official) VALUES (?, ?, ?)`)
.run('MCU Duplicate', 'device-code-1', 0)
}).toThrow()
})
})