Skip to content

fix: Add reflection auto-detection to REST API entry endpoint#3

Merged
jameslbarnes merged 1 commit intomasterfrom
fix/rest-api-reflection-detection
Feb 28, 2026
Merged

fix: Add reflection auto-detection to REST API entry endpoint#3
jameslbarnes merged 1 commit intomasterfrom
fix/rest-api-reflection-detection

Conversation

@N0V3LT0K3NS
Copy link
Collaborator

Summary

  • The MCP tool handler (write_to_shared_notebook) auto-detects reflections by checking content length >= 500 chars and sets isReflection: true
  • The REST API POST /api/entries endpoint did not do this
  • Entries created via REST API rendered as plain escaped text instead of markdown on the frontend

Changes

  • server/src/http.ts: Added 2 lines to POST /api/entries handler — identical reflection auto-detection logic already used by the MCP tool handler (line 1549-1550)

Testing

  • All 247 existing tests pass
  • Parity fix — matches existing behavior in the MCP handler

🤖 Generated with Claude Code

The MCP tool handler auto-detects reflections (entries >= 500 chars)
and sets isReflection, but the REST API POST /api/entries endpoint
did not. This caused entries created via REST to render as plain
escaped text instead of markdown on the frontend.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jameslbarnes jameslbarnes merged commit f662a1f into master Feb 28, 2026
2 checks passed
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