bug: fix secret mask calculation#193
Conversation
…y is missing Signed-off-by: gkrajniak <gkrajniak@gmail.com>
📝 WalkthroughWalkthroughThe ChangesSecretValue undefined value handling
Estimated code review effort: 1 (Trivial) | ~5 minutes PoemA rabbit hopped through code so neat, 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
projects/ngx/declarative-ui/resource-field/secret-value/secret-value.component.ts (1)
17-20: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winRelax
valueto an optional input
value()is only used inside the@if (isVisible())branch, butresource-field.component.htmlcan still passundefinedhere.input<string>()matches the actual data flow better thaninput.required<string>().🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@projects/ngx/declarative-ui/resource-field/secret-value/secret-value.component.ts` around lines 17 - 20, The SecretValueComponent input contract is too strict: value is marked required even though callers may pass undefined and it is only consumed when isVisible() is true. Update the value field in secret-value.component.ts from input.required<string>() to an optional input signature using input<string>() so the component matches the actual data flow, while keeping maskedValue and the existing isVisible logic unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In
`@projects/ngx/declarative-ui/resource-field/secret-value/secret-value.component.ts`:
- Around line 17-20: The SecretValueComponent input contract is too strict:
value is marked required even though callers may pass undefined and it is only
consumed when isVisible() is true. Update the value field in
secret-value.component.ts from input.required<string>() to an optional input
signature using input<string>() so the component matches the actual data flow,
while keeping maskedValue and the existing isVisible logic unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 801f140c-c29a-4b88-a8ef-2f7bf54b6587
📒 Files selected for processing (2)
projects/ngx/declarative-ui/resource-field/secret-value/secret-value.component.spec.tsprojects/ngx/declarative-ui/resource-field/secret-value/secret-value.component.ts
secret value cell crashes the whole table when the configured data key is missing
Summary by CodeRabbit