Skip to content

Fix chunks confusion on translation function #86exw91re#50

Merged
navidshad merged 4 commits into
mainfrom
dev
Jun 8, 2026
Merged

Fix chunks confusion on translation function #86exw91re#50
navidshad merged 4 commits into
mainfrom
dev

Conversation

@navidshad

@navidshad navidshad commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

📋 Summary

This PR includes a fix to the subscription logic by rewriting Stripe product metadata authoritatively in the setup-stripe-pricing process. It also resolves an issue in the translation functionality by extracting chunks only from the specifically marked text rather than its surrounding context. Additionally, documentation has been enhanced with the addition of ClickUp-based branching and pull request guidelines in the CLAUDE.md file.

🔗 Related Tasks

#86exw91re - Fix chunks confusion on translation function (Navid Shad)

📝 Additional Details

  • The Stripe metadata fix ensures that product metadata is correctly set up and authoritative during pricing setup.
  • The translation fix improves text chunk extraction accuracy to avoid including extraneous context.
  • Documentation updates provide clearer branching and PR guidelines based on ClickUp workflows.

📜 Commit List

  • 260be05 fix(subscription): rewrite Stripe product metadata authoritatively in setup-stripe-pricing
  • f408e83 fix(translation): only extract chunks from the marked text, not its context
  • 3b06ff4 docs: add ClickUp-based branching and pull request guidelines to CLAUDE.md

navidshad and others added 4 commits June 8, 2026 12:43
…ontext

The detailed-translation and advice models intermittently surfaced
reusable patterns (chunks) drawn from the surrounding `context` rather
than the user's marked selection. e.g. selecting "improvements are
included" returned "related to" and "based on", which appear only in the
context paragraph.

Add a deterministic guardrail, `filterChunksToSelection`, that drops any
chunk whose text does not appear (case- and whitespace-insensitively)
inside the marked `phrase`, and apply it to both `getDetailedTranslation`
and `getTranslationAdvice`. Also harden both prompts to state explicitly
that the context is only for disambiguating meaning and must never be a
source of chunks.

https://claude.ai/code/session_01UTb6tc1wE8UyWxCKvBHmwT
… setup-stripe-pricing

stripe.products.update merges metadata, so keys you stop sending linger on the product. Removing a tier feature bullet left orphaned feature_<n> keys, and the lenient display parser renders every feature_<n> it finds, so deleted bullets kept showing on the pricing page. Clear every existing key to "" (Stripe deletes empty-valued keys) before overlaying the desired set, making the product metadata an authoritative rewrite. Also refresh the Reader card copy.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…sion-on-translation-function_Navid-Shad

fix(translation): only extract chunks from the marked text, not its c…
@navidshad

Copy link
Copy Markdown
Contributor Author

@navidshad navidshad changed the title Dev Fix chunks confusion on translation function (Navid Shad) #86exw91re Jun 8, 2026
@navidshad navidshad changed the title Fix chunks confusion on translation function (Navid Shad) #86exw91re Fix chunks confusion on translation function #86exw91re Jun 8, 2026
@navidshad navidshad merged commit d1bcd99 into main Jun 8, 2026
8 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0-dev.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants