Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CODEBASE_DOCUMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ test/integration/endpoints.test.js - API endpoint contract tests
test/integration/rig-parsing-fallback.test.js - Real server + stubbed CLI coverage for rig list fallback/emoji parsing
test/integration/websocket.test.js - WebSocket lifecycle tests
test/integration/cache.test.js - Cache invalidation tests
test/integration/realtime-cache-invalidation.test.js - Real server cache invalidation coverage for rig/service mutation freshness

test/unit/ - 32 unit test files covering:
├─ Domain values: safeSegment, agentPath
Expand Down
25 changes: 15 additions & 10 deletions js/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ export const api = {
},

// === Status ===
getStatus() {
return this.get('/api/status');
getStatus(refresh = false) {
const query = refresh ? '?refresh=true' : '';
return this.get(`/api/status${query}`);
},

getHealth() {
Expand Down Expand Up @@ -93,8 +94,9 @@ export const api = {
},

// === Mail ===
getMail() {
return this.get('/api/mail');
getMail(refresh = false) {
const query = refresh ? '?refresh=true' : '';
return this.get(`/api/mail${query}`);
},

getMailMessage(id) {
Expand All @@ -114,8 +116,9 @@ export const api = {
},

// === Agents ===
getAgents() {
return this.get('/api/agents');
getAgents(refresh = false) {
const query = refresh ? '?refresh=true' : '';
return this.get(`/api/agents${query}`);
},

nudge(target, message, autoStart = true) {
Expand Down Expand Up @@ -215,8 +218,9 @@ export const api = {
return this.get('/api/setup/status');
},

getRigs() {
return this.get('/api/rigs');
getRigs(refresh = false) {
const query = refresh ? '?refresh=true' : '';
return this.get(`/api/rigs${query}`);
},

addRig(name, url) {
Expand All @@ -228,8 +232,9 @@ export const api = {
},

// === Crew Management ===
getCrews() {
return this.get('/api/crews');
getCrews(refresh = false) {
const query = refresh ? '?refresh=true' : '';
return this.get(`/api/crews${query}`);
},

getCrewStatus(name) {
Expand Down
Loading
Loading