Skip to content

fix: answer 404 for a conversation, call or Dot that does not exist - #98

Merged
jerelvelarde merged 1 commit into
CopilotKit:mainfrom
charan-rathore:fix/not-found-routes-answer-404
Oct 6, 2026
Merged

jerelvelarde merged 1 commit into
CopilotKit:mainfrom
charan-rathore:fix/not-found-routes-answer-404

Conversation

@charan-rathore

Copy link
Copy Markdown
Contributor

Problem

On the workspace routes, asking for a conversation, call or Dot that does not exist answers 503 with "The service request failed. Check the server configuration and try again." Examples: GET /api/conversations/<unknown>/capture and GET /api/voice/calls/<unknown>. A missing resource is a caller error, so the status and message send the user to check the server configuration for something that is not wrong with the server.

Change

  • The onError handler in workspaceRoutes now answers 404 with the error's own message for "Dot not found", "Call not found" and "Conversation does not belong ..." instead of 503.
  • Real Intelligence and setup failures still answer 503, unchanged.
  • Regression test in tests/page-routes.test.ts for the conversation capture and call routes.

Testing

typecheck, eslint, prettier check and the full vitest suite (234 tests) pass. The new test fails without the change to workspace-routes.ts and passes with it.

@jerelvelarde jerelvelarde left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Useful, narrow API consistency fix: missing or inaccessible conversations, calls and Dots return safe 404s while genuine service failures retain sanitized 503 responses. Synthetic ownership/provider-error requests and all 47 focused tests pass; full branch checks pass. No security or correctness blocker. Combined integration with current main passes 265 tests, type checking, lint, formatting and the production build; this exact PR head has successful CI.

@jerelvelarde
jerelvelarde merged commit ce50fc8 into CopilotKit:main Oct 6, 2026
1 check passed
@charan-rathore
charan-rathore deleted the fix/not-found-routes-answer-404 branch October 6, 2026 21:59
jerelvelarde added a commit that referenced this pull request Oct 6, 2026
* feat(pages): add page deletion with safe subpage reparenting

* fix(pages): keep review receipts on delete, drop unused delete tool, cover cleanup in tests

* fix(pages): handle deleted reviewed pages, avoid stale draft prompt, document deletion

* fix(pages): drop deleted pages from the library and resync reparented children

* fix(pages): ignore stale deletion after leaving the page and clear saved receipt on deletion

* Track OpenDots browser setup and Intelligence signup usage (#97)

* Track OpenDots runtime usage for Intelligence signup reporting

* Track browser setup and verify OpenDots reporting in PostHog

* fix: distinguish scheduled turns and neutralize task activity logs (#105)

* fix: distinguish scheduled turns and neutralize task activity logs

* fix: keep scheduled prompt label readable

---------

Co-authored-by: Jerel John Velarde <[email protected]>

* fix(research): keep balanced brackets in URLs from the research prompt (#99)

* fix(research): keep balanced brackets in URLs from the research prompt

Signed-off-by: Charan Rathore <[email protected]>

* fix(research): parse Markdown link boundaries when the label is a URL

A link like [https://example.com](https://example.com) let the label
swallow the destination, so both research adapters received a malformed
URL. Split the ]( boundary before matching so the two occurrences are
read separately, keeping the balanced-delimiter trimming. Adds the
regression test from review.

Signed-off-by: Charan Rathore <[email protected]>

---------

Signed-off-by: Charan Rathore <[email protected]>

* fix: answer 404 for a conversation, call or Dot that does not exist (#98)

Signed-off-by: Charan Rathore <[email protected]>

* fix: submit the home composer on Enter (#95)

Signed-off-by: Charan Rathore <[email protected]>

* fix: return 400 instead of 503 for malformed JSON and invalid Space access (#11)

* fix: return 400 for malformed JSON and invalid Space access on workspace routes

Malformed request bodies on /api/spaces, /api/dots, /api/conversations and
/api/voice/calls, and Dot create/update with an unknown Space, fell through to
the generic 503 handler, which tells the caller to check server configuration.
Return 400 with a specific message instead, matching the page routes.

Signed-off-by: asemabdallah <[email protected]>

* fix: handle malformed request JSON at the body-parsing boundary

Catch JSON parse failures where each workspace route reads its request body
instead of mapping every SyntaxError to 400 in the global handler. Malformed
caller JSON still gets a 400 from the route's schema check, while a SyntaxError
raised by an upstream service call stays a 503. Add a regression test for the
upstream case.

Signed-off-by: asemabdallah <[email protected]>

---------

Signed-off-by: asemabdallah <[email protected]>

* style: unify the ink accent, fix text contrast, and clarify disabled states (#82)

* style: unify the ink accent, fix contrast, and clarify disabled states

The compact-chrome layer moved the app to an ink palette, but primary
buttons, focus rings, checkboxes, and setup notes kept the original
lavender, so Settings and Contacts looked like a different app.

- Primary buttons, focus rings, and checkboxes use one ink accent.
- Disabled primary/send/connect buttons look disabled (the send button
  was near-black at 90% opacity before setup).
- Secondary text in setup cards, config notes, and permission rows meets
  WCAG AA (was ~2.4-2.7:1, now 5.3:1).
- Settings shows missing environment variables as code.
- Sidebar: Spaces gets the same spacing as Dots, labels stay on one line,
  and zero-count badges are hidden.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: keep the call view's pale focus ring on its dark surface

Review fix: the ink focus outline now excludes controls inside .call-view,
so they keep the base #b8c4fa 3px ring instead of a #242424 ring with
~1.3-1.8:1 contrast on the dark call background. Verified in Chromium
with keyboard focus: call control #b8c4fa 3px; other controls #242424 2px.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>

---------

Signed-off-by: Charan Rathore <[email protected]>
Signed-off-by: asemabdallah <[email protected]>
Co-authored-by: Jerel Velarde <[email protected]>
Co-authored-by: Twil3akine <[email protected]>
Co-authored-by: Jerel John Velarde <[email protected]>
Co-authored-by: Charan Rathore <[email protected]>
Co-authored-by: Asem ahmed <[email protected]>
Co-authored-by: Jibran Tahir <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
asasemahmed added a commit to asasemahmed/FullDots that referenced this pull request Oct 11, 2026
superops-team pushed a commit to superops-team/OpenMPA that referenced this pull request Oct 29, 2026
superops-team pushed a commit to superops-team/OpenMPA that referenced this pull request Oct 29, 2026
…Kit#49)

* feat(pages): add page deletion with safe subpage reparenting

* fix(pages): keep review receipts on delete, drop unused delete tool, cover cleanup in tests

* fix(pages): handle deleted reviewed pages, avoid stale draft prompt, document deletion

* fix(pages): drop deleted pages from the library and resync reparented children

* fix(pages): ignore stale deletion after leaving the page and clear saved receipt on deletion

* Track OpenDots browser setup and Intelligence signup usage (CopilotKit#97)

* Track OpenDots runtime usage for Intelligence signup reporting

* Track browser setup and verify OpenDots reporting in PostHog

* fix: distinguish scheduled turns and neutralize task activity logs (CopilotKit#105)

* fix: distinguish scheduled turns and neutralize task activity logs

* fix: keep scheduled prompt label readable

---------

Co-authored-by: Jerel John Velarde <[email protected]>

* fix(research): keep balanced brackets in URLs from the research prompt (CopilotKit#99)

* fix(research): keep balanced brackets in URLs from the research prompt

Signed-off-by: Charan Rathore <[email protected]>

* fix(research): parse Markdown link boundaries when the label is a URL

A link like [https://example.com](https://example.com) let the label
swallow the destination, so both research adapters received a malformed
URL. Split the ]( boundary before matching so the two occurrences are
read separately, keeping the balanced-delimiter trimming. Adds the
regression test from review.

Signed-off-by: Charan Rathore <[email protected]>

---------

Signed-off-by: Charan Rathore <[email protected]>

* fix: answer 404 for a conversation, call or Dot that does not exist (CopilotKit#98)

Signed-off-by: Charan Rathore <[email protected]>

* fix: submit the home composer on Enter (CopilotKit#95)

Signed-off-by: Charan Rathore <[email protected]>

* fix: return 400 instead of 503 for malformed JSON and invalid Space access (CopilotKit#11)

* fix: return 400 for malformed JSON and invalid Space access on workspace routes

Malformed request bodies on /api/spaces, /api/dots, /api/conversations and
/api/voice/calls, and Dot create/update with an unknown Space, fell through to
the generic 503 handler, which tells the caller to check server configuration.
Return 400 with a specific message instead, matching the page routes.

Signed-off-by: asemabdallah <[email protected]>

* fix: handle malformed request JSON at the body-parsing boundary

Catch JSON parse failures where each workspace route reads its request body
instead of mapping every SyntaxError to 400 in the global handler. Malformed
caller JSON still gets a 400 from the route's schema check, while a SyntaxError
raised by an upstream service call stays a 503. Add a regression test for the
upstream case.

Signed-off-by: asemabdallah <[email protected]>

---------

Signed-off-by: asemabdallah <[email protected]>

* style: unify the ink accent, fix text contrast, and clarify disabled states (CopilotKit#82)

* style: unify the ink accent, fix contrast, and clarify disabled states

The compact-chrome layer moved the app to an ink palette, but primary
buttons, focus rings, checkboxes, and setup notes kept the original
lavender, so Settings and Contacts looked like a different app.

- Primary buttons, focus rings, and checkboxes use one ink accent.
- Disabled primary/send/connect buttons look disabled (the send button
  was near-black at 90% opacity before setup).
- Secondary text in setup cards, config notes, and permission rows meets
  WCAG AA (was ~2.4-2.7:1, now 5.3:1).
- Settings shows missing environment variables as code.
- Sidebar: Spaces gets the same spacing as Dots, labels stay on one line,
  and zero-count badges are hidden.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: keep the call view's pale focus ring on its dark surface

Review fix: the ink focus outline now excludes controls inside .call-view,
so they keep the base #b8c4fa 3px ring instead of a #242424 ring with
~1.3-1.8:1 contrast on the dark call background. Verified in Chromium
with keyboard focus: call control #b8c4fa 3px; other controls #242424 2px.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>

---------

Signed-off-by: Charan Rathore <[email protected]>
Signed-off-by: asemabdallah <[email protected]>
Co-authored-by: Jerel Velarde <[email protected]>
Co-authored-by: Twil3akine <[email protected]>
Co-authored-by: Jerel John Velarde <[email protected]>
Co-authored-by: Charan Rathore <[email protected]>
Co-authored-by: Asem ahmed <[email protected]>
Co-authored-by: Jibran Tahir <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
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.

2 participants