fix(standard-reply): show only the human-readable description#197
Conversation
The IRCv3 standard-replies spec is explicit that `<description>` is the
end-user-facing text and `<command>`/`<code>` are computer-readable. The
old UI inverted that — bolded `FAIL AUTHENTICATE SASL_FAIL` at the top
and demoted the actual message — and the parser was also corrupting the
description in two ways:
1. `parv.slice(N).join(" ").substring(1)` chopped the first character
off every description (the parser already strips the leading `:`).
2. `parv[2]` was unconditionally treated as the context, so `FAIL CMD
CODE :Description` (no context) was rendered as a chip with the
description text and an empty body.
This refactors the FAIL/WARN/NOTE/SUCCESS/REGISTER handlers to use the
`trailing` argument as the description and to slice context from
`parv[2..n-1]`. The UI now renders only the description plus optional
context chips for channels/nicks/accounts the description references.
The technical command/code is still on the row's `title` for hover.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughThis PR adds machine-readable context array support to IRCv3 standard replies. It updates IRC protocol parsing to extract context tokens, propagates context through event routing and store handlers, refactors the StandardReplyNotification component to render context as chips with metadata tooltips, and adds comprehensive test coverage for both parsing logic and UI rendering. ChangesStandard Reply Context Feature
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
|
Automated deployment preview for the PR in the Cloudflare Pages. |
The IRCv3 standard-replies spec is explicit that
<description>is the end-user-facing text and<command>/<code>are computer-readable. The old UI inverted that — boldedFAIL AUTHENTICATE SASL_FAILat the top and demoted the actual message — and the parser was also corrupting the description in two ways:parv.slice(N).join(" ").substring(1)chopped the first character off every description (the parser already strips the leading:).parv[2]was unconditionally treated as the context, soFAIL CMD CODE :Description(no context) was rendered as a chip with the description text and an empty body.This refactors the FAIL/WARN/NOTE/SUCCESS/REGISTER handlers to use the
trailingargument as the description and to slice context fromparv[2..n-1]. The UI now renders only the description plus optional context chips for channels/nicks/accounts the description references. The technical command/code is still on the row'stitlefor hover.Summary by CodeRabbit
New Features
Bug Fixes
Tests