waves: warn that a wave too short to earn points will not count - #1400
Conversation
A wave is a comment on the chain, so the points backend applies the same minimum length to it as to a reply: at or under the threshold once URLs are stripped, it earns nothing and never reaches the daily comment quest. #1392 closed this for the reply composer and left waves out of scope. Measuring it since: about one in six waves posted from Ecency falls under the threshold. Waves are short by design, which is exactly why the rule bites here. The indexer and the points backend agree on the same set over the same window, so that is a count rather than an estimate. The predicate moves to a shared helper instead of being written a second time. The reply composer now uses it too, so the two composers cannot drift apart on a rule the backend owns, and the rule is testable without standing up either composer. The hint is not gated on the reply case: a reply to a wave is a comment too and earns on the same rule. Closes #1399
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe change adds a shared short-content hint predicate, applies it to replies and waves, adds wave-form hint rendering, localizes the message, and tests content eligibility cases. ChangesShort-content quest hints
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
Possibly related PRs
Suggested labels: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Closes #1399.
A wave is a comment on the chain, so the points backend applies the same minimum length to it as to a reply: at or under the threshold once URLs are stripped, it earns nothing and never reaches the daily comment quest. #1392 closed this for the reply composer and left waves out of scope.
About one in six waves posted from Ecency falls under the threshold. Waves are short by design, which is exactly why the rule bites here. The indexer and the points backend agree on the same set over the same window, so that is a count rather than an estimate.
Shared, not duplicated
Adding the hint here would have written the same predicate a second time, on a rule the backend owns and can move. So it moves to
shouldShowShortContentHint, and the reply composer now uses it too. The two composers cannot drift apart, and the rule is testable without standing up either of them.The hint is deliberately not gated on the reply case: a reply to a wave is a comment as well and earns on the same rule.
Same behaviour as the reply composer: it does not block submitting, and it stays quiet for logged-out users, on an empty composer, and while editing (the original already claimed the reward).
No SDK change needed.
earnsQuestContentCreditandQUEST_MIN_CONTENT_LENGTHlanded with #1394 and are already in the committed dist, so typecheck is green without a label this time.Verification
The new spec covers the refused cases, the link-only case, emoji counted as code points rather than UTF-16 units, a body long enough to earn, an untouched composer, and the logged-out and editing gates. The existing reply composer render tests still pass unchanged through the shared helper, which is what confirms the refactor is behaviour-preserving.
Not covered by tests: the wave form's own rendering, which needs the full composer stood up. Worth a look that the hint sits sensibly next to the streak chip and reads right alongside the character counter at the other end of the range.
Mirrored for the app in ecency/vision-mobile#3485.
Summary by CodeRabbit
New Features
Bug Fixes