Skip to content

The token dialog shows a statements source its own push URL, not the one for documents - #1111

Merged
WaylandYang merged 2 commits into
devfrom
fix/statements-token-endpoint
Oct 9, 2026
Merged

WaylandYang merged 2 commits into
devfrom
fix/statements-token-endpoint

Conversation

@WaylandYang

Copy link
Copy Markdown
Contributor

Why

Reported in #924. The Token dialog wrote POST …/api/v1/sources/{id}/ingest for every push source. A Statements source is pushed to /statements, and the server answers /ingest on it with a bare 404. Someone who copied the URL from the dialog could not push a single statement.

What changes

  • pushEndpoint(origin, sourceId, kind) picks the door by kind: statements goes to /statements, everything else to /ingest.
  • The dialog is told the source's kind, both when it opens from the side panel and right after a source is created.

No server change.

How it was checked

  • New pushEndpoint.test.ts; pnpm test (231 tests) and pnpm build pass.
  • In the browser against a local server: the dialog of a Statements source shows …/statements, and the dialog of an API source still shows …/ingest.

🤖 Generated with Claude Code

WaylandYang and others added 2 commits October 9, 2026 11:38
…one for documents

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Wayland Yang <wayland0916@gmail.com>
@WaylandYang
WaylandYang merged commit f8ddd09 into dev Oct 9, 2026
6 checks passed
@WaylandYang
WaylandYang deleted the fix/statements-token-endpoint branch October 9, 2026 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant