Skip to content

reply drafts: Improve quality tracking#2742

Open
elie222 wants to merge 4 commits into
mainfrom
analyze-recent-draft-quality
Open

reply drafts: Improve quality tracking#2742
elie222 wants to merge 4 commits into
mainfrom
analyze-recent-draft-quality

Conversation

@elie222

@elie222 elie222 commented May 26, 2026

Copy link
Copy Markdown
Owner

No description provided.

@vercel

vercel Bot commented May 26, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
inbox-zero Ignored Ignored Preview May 26, 2026 11:41am

elie222 and others added 2 commits May 26, 2026 14:07
- Inline single-caller helper, collapse duplicated return blocks,
  and cache repeated regex checks in draft tracking metadata
- Avoid re-normalizing values per topic variant in reply memory
  topic relevance check
- Hoist regex constant to top of referral signature module

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1 issue found across 12 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/web/utils/ai/reply/extract-reply-memories.ts">

<violation number="1" location="apps/web/utils/ai/reply/extract-reply-memories.ts:317">
P2: Topic relevance check uses substring matching, which can produce false positives and incorrectly convert GLOBAL memories to TOPIC.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic


return [content, incomingEmailContent, draftText, sentText].some((value) =>
normalizedTopicVariants.some((topic) =>
normalizeMemoryText(value).includes(topic),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2: Topic relevance check uses substring matching, which can produce false positives and incorrectly convert GLOBAL memories to TOPIC.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/web/utils/ai/reply/extract-reply-memories.ts, line 317:

<comment>Topic relevance check uses substring matching, which can produce false positives and incorrectly convert GLOBAL memories to TOPIC.</comment>

<file context>
@@ -250,6 +243,94 @@ function normalizeMemoryText(value: string) {
+
+  return [content, incomingEmailContent, draftText, sentText].some((value) =>
+    normalizedTopicVariants.some((topic) =>
+      normalizeMemoryText(value).includes(topic),
+    ),
+  );
</file context>

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