Skip to content
This repository was archived by the owner on Jul 16, 2026. It is now read-only.

feat(web-server): /presenter endpoint — clean rebase of #72 - #99

Open
jgluck96 wants to merge 1 commit into
mainfrom
fix/phase-5.2-clean
Open

jgluck96 wants to merge 1 commit into
mainfrom
fix/phase-5.2-clean

Conversation

@jgluck96

@jgluck96 jgluck96 commented Jun 3, 2026

Copy link
Copy Markdown

Summary

Clean cherry-pick of PR #72 (josh/phase-5.2-web-server-endpoints) onto current main. The original PR included PR #69's stando-ui extraction as ancestor commits (111 file diff); this branch isolates the actual 3-file change.

What changed:

  • src/web-server.ts: adds GET /presenter endpoint (returns presenter-mode state)
  • tests/web-server-presenter.test.ts: 87-line test suite for the new endpoint
  • tests/tasks-api.test.ts: removed (orphaned test whose subject moved to stando-ui)

Note on tasks-api.test.ts deletion: PR #93 (fix/tasks-api-test-clean) also removes this file via a separate cherry-pick. Whichever merges first, the other will resolve cleanly (file already gone).

Note on src/web-server.ts: both this PR and #98 (CLIENT_DIST_DIR) touch web-server.ts. Suggested merge order: #98 first, then this.

Closes #72 (supersedes it with a clean diff).

Test plan

  • npm test — web-server-presenter.test.ts passes
  • GET /presenter returns expected JSON shape

🤖 Generated with Claude Code

Phase 5.2 of the OSS→stando backend reconciliation. Ports the one
genuinely-missing, infra-backed web-server endpoint from OSS sutando.

/presenter — exposes the presenter-mode sentinel
(state/presenter-mode.sentinel, written by scripts/presenter-mode.sh and
already polled by the Discord/Slack/Telegram bridges) to the React UI.
The UI was already designed for it: the existing /voice-mode comment
references "the presenter badge poll to render the composite 3-mode
badge", but the endpoint didn't exist. Returns { active, expiresAt };
past/garbage/missing expiry → inactive (matches the bridges' is_active
checks). Reads via statePath('state/presenter-mode.sentinel'), the same
workspace path resolve_workspace() gives the bridges.

Deliberately NOT ported (OSS-specific, no stando infra / feature
decisions, not endpoint hardening): /chat (standalone chat page),
/overlays + /api/overlays (overlay-apps manager — no overlay infra in
stando), /paidsubscriptions* (subscription-scanner web UI — skill exists
but no web rendering layer).

Also removes tests/tasks-api.test.ts: it imported
../client/src/lib/tasks-api.ts, which PR #69 moved to the stando-ui repo.
The test is orphaned in stando (code gone) — coverage belongs in
stando-ui now.

Verified: tsc clean; new tests/web-server-presenter.test.ts 4/4; full TS
suite 244/244.

Co-authored-by: Cursor <cursoragent@cursor.com>

@bassilkhilo-ag2 bassilkhilo-ag2 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The /presenter endpoint is clean — reads state/presenter-mode.sentinel, returns {active, expiresAt} JSON, handles missing-file gracefully. Same file the bridges already poll, so no new state to maintain. Test coverage looks solid (active, expired, absent, wrong-method). One note: this also deletes tests/tasks-api.test.ts — same deletion as PR #93 which is still open. Whichever merges second will get a trivial conflict on that file; easy to resolve but worth knowing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants