Skip to content

fix(reading-chat): include memos for memo-comparison questions - #272

Merged
Rasukarusan merged 1 commit into
masterfrom
codex/ai
Aug 11, 2026
Merged

Rasukarusan merged 1 commit into
masterfrom
codex/ai

Conversation

@Rasukarusan

Copy link
Copy Markdown
Owner

Motivation

  • Some user questions that compare or rank memos (e.g. “一番感想が長い本”) failed because the planner returned includeMemo: false or searchText: "感想", which caused the app to omit full memo text or accidentally filter out records.

Description

  • Clarify the planner prompt so it explicitly requests includeMemo=true for questions about memo body, length, character count, or content comparisons. (apps/api/src/application/usecases/reading-chat/ask-reading-chat.ts)
  • Add applyQuestionIntent which detects memo-related and comparison-related intent from the question and enforces includeMemo: true, and for comparisons sets searchText to undefined and limit to MAX_LIMIT. (applyQuestionIntent in the same file)
  • Wire planQuery to call applyQuestionIntent after normalizing the planner result so the server side compensates for planner variation. (planQuery changes)
  • Add a regression test that verifies a “longest impression” style question requests memo bodies and up to 100 candidates. (apps/api/src/application/usecases/reading-chat/ask-reading-chat.spec.ts)

Testing

  • Ran pnpm --filter api test -- --runInBand application/usecases/reading-chat/ask-reading-chat.spec.ts, and the spec passed: 5 tests, 0 failures.
  • Ran ESLint via pnpm --filter api exec eslint src/application/usecases/reading-chat/ask-reading-chat.ts src/application/usecases/reading-chat/ask-reading-chat.spec.ts, which succeeded.
  • Ran type check with pnpm --filter api check-types, which failed due to pre-existing Prisma-generated typing errors in unrelated files (ai-summary.ts and discovery.ts); there are no type errors introduced by the changed files.

Codex Task

@vercel

vercel Bot commented Aug 11, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
kidoku Ready Ready Preview Aug 11, 2026 3:01am

@Rasukarusan
Rasukarusan merged commit bb43825 into master Aug 11, 2026
7 of 8 checks passed
@Rasukarusan
Rasukarusan deleted the codex/ai branch August 11, 2026 03:00

This branch was successfully deployed

1 active deployment
Preview — d2935f8a Deployed Aug 11, 2026 by Rasukarusan via deploy #21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant