[Customer Portal MicroApp] Remove the comment bar entirely on closed cases - #1189
Conversation
…cases isClosed was already computed in this component (used for the feedback prompt and case actions) but never applied to the comment composer — StickyCommentBar was rendered unconditionally, so a closed case could still take new comments through the UI. Hides it outright rather than just disabling it, and drops the reserved bottom margin to match, same treatment ChatDetailPage already gives its read-only state.
📝 WalkthroughWalkthrough
ChangesClosed case comment behavior
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@apps/customer-portal/microapp/src/pages/CaseDetailPage.tsx`:
- Around line 74-75: Add a !data guard to handleSend alongside the existing
comment and isClosed checks, and pass disabled={!data} to StickyCommentBar so
submissions and input remain unavailable until case data loads. Apply both
changes in apps/customer-portal/microapp/src/pages/CaseDetailPage.tsx at lines
74-75 and 342-350.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 4ce76355-68f9-4b98-a790-9a5dcc9fbc46
📒 Files selected for processing (1)
apps/customer-portal/microapp/src/pages/CaseDetailPage.tsx
Purpose
A closed case could still take new comments through the UI in the Customer Portal microapp — the comment bar had no closed-case gating at all.
Goals
Approach
isClosedwas already computed inCaseDetailPage.tsx(used for the feedback prompt and the case-actions menu) but never applied to the comment composer —StickyCommentBarwas rendered unconditionally, with nodisabledprop passed even though the component already supports one.mb) to match — same treatmentChatDetailPagealready gives its own read-only state (isReadOnly).handleSenditself too, so nothing can post while closed even if some other path reaches it.User stories
As a customer, once my case is closed, I no longer see a way to add a comment on it.
Release note
Closed cases no longer show a comment box in the Customer Portal mobile app.
Documentation
N/A — internal customer portal UI change, no external doc surface affected.
Automation tests
tsc -b,eslint, andvite buildall clean.Security checks
Test environment
Summary by CodeRabbit