chore(demo): hide Plan/Execute toggle + add message backdate route#302
Closed
lilyshen0722 wants to merge 1 commit intomainfrom
Closed
chore(demo): hide Plan/Execute toggle + add message backdate route#302lilyshen0722 wants to merge 1 commit intomainfrom
lilyshen0722 wants to merge 1 commit intomainfrom
Conversation
Two unrelated demo-prep changes bundled to share a deploy cycle.
1. Hide the Plan/Execute mode toggle
-------------------------------------
The pod-mode toggle persists `mode` to the pod but no downstream
surface uses it for behavior — clicks land but nothing changes for
the user, so the control reads as broken in any demo or dogfood
context. Wrap the JSX in `{false && (...)}` with a comment naming
the re-enable condition (downstream actually uses the field).
Surgical revert: delete the wrapper.
2. PATCH /api/messages/:id/created-at — backdate route
-------------------------------------------------------
Backdates a chat message's `created_at` (and `updated_at`).
Pod-creator-only or message-author; no general-purpose user
authorization to edit other people's chronology.
Why this exists: chat-history demos / fixtures want plausible
"yesterday afternoon / yesterday evening / this morning" timestamps,
but POST /:podId always stamps with NOW(). Direct PG UPDATE works
for ops with PG access; this route is the same capability when
PG is firewalled (Aiven IP-allowlist + kubectl exec connection
tracking blocking new sessions even from inside the cluster).
Body: { created_at: ISO8601 string }
Backed by the same long-lived PG pool as the rest of the messaging
stack (`config/db-pg`), so no new connection profile is needed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two demo-prep changes bundled to share one deploy cycle.
1. Hide Plan/Execute mode toggle
The toggle persists
modeto the pod but no downstream surface uses it for behavior — clicks land but nothing changes. Reads as broken in demos. Wrapped in{false && (...)}with a comment naming the re-enable condition.2.
PATCH /api/messages/:id/created-at— backdate routePod-creator-or-author can set a message's
created_atto a past timestamp. Body:{ created_at: ISO8601 }.Why: PG egress to Aiven is firewalled from kubectl exec (long-lived backend pool works, new sessions time out at TCP). Demo seeding wants "yesterday afternoon / evening / this morning" timestamps but POST always stamps NOW(). Backed by the same
config/db-pgpool as the rest of messaging.🤖 Generated with Claude Code