Skip to content

Changes from V2 branch - #1057

Merged
Rashmika998 merged 2 commits into
mainfrom
v2
Jul 6, 2026
Merged

Rashmika998 merged 2 commits into
mainfrom
v2

Conversation

@Rashmika998

@Rashmika998 Rashmika998 commented Jul 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes

    • Improved chat message timestamp formatting so it stays up to date when date/time settings change.
    • Fixed page title behavior so chat pages reset correctly when you leave the view.
    • Refined key handling in the comment bar to better match the active input area.
  • Style / UI

    • Improved dark-mode rendering for rich text images.
    • Kept copy-related behavior and message interactions more reliable across repeated actions.

2003dinijay and others added 2 commits July 6, 2026 10:15
- OverlineSlot.tsx: add missing useRef/useEffect imports and an
  explicit initial value for useRef, needed by the debounced copy
  timeout added in a prior commit.
- StickyCommentBar.tsx: type the onKeyDown handler against
  HTMLDivElement, matching what MUI TextField actually exposes on
  that prop, instead of HTMLInputElement | HTMLTextAreaElement.
- ChatDetailPage.tsx: pass the required MutationFunctionContext second
  argument to mutationFn (TanStack Query v5 requires it), and include
  format/setTitleOverride in effect dependency arrays.
- useDateTime.ts: wrap the returned formatting functions in useCallback
  so they have stable references for the above dependency arrays.
- RichText.tsx: formatting only, no behavior change.
…t-broken-imports

[Customer Portal MicroApp] hotfix: fix broken imports crashing all detail page headers
@coderabbitai

coderabbitai Bot commented Jul 6, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3127c011-1e8e-4f7f-9135-5e5933c4c5f2

📥 Commits

Reviewing files that changed from the base of the PR and between f1aa164 and 81aa2c3.

📒 Files selected for processing (5)
  • apps/customer-portal/microapp/src/components/features/detail/OverlineSlot.tsx
  • apps/customer-portal/microapp/src/components/features/detail/StickyCommentBar.tsx
  • apps/customer-portal/microapp/src/components/shared/RichText.tsx
  • apps/customer-portal/microapp/src/pages/ChatDetailPage.tsx
  • apps/customer-portal/microapp/src/utils/useDateTime.ts

📝 Walkthrough

Walkthrough

This PR applies several small, unrelated fixes across the customer-portal microapp: memoization corrections in useDateTime, a keyboard event type fix in StickyCommentBar, a ref initialization fix in OverlineSlot, a CSS rule reposition in RichText, and mutation/effect dependency fixes in ChatDetailPage.

Changes

Customer Portal Microapp Fixes

Layer / File(s) Summary
Copy timer ref typing
.../detail/OverlineSlot.tsx
Adds useEffect/useRef imports and explicitly initializes copyTimeoutRef as undefined-typed, aligning with existing clearTimeout guards.
Keyboard event type fix
.../detail/StickyCommentBar.tsx
Changes handleKeyDown parameter type from a union of input/textarea types to KeyboardEvent<HTMLDivElement>.
Dark theme image rule reposition
.../shared/RichText.tsx
Relocates the & img filter rule within the dark theme styles block of RichTextBase.
Chat mutation and effect fixes
.../pages/ChatDetailPage.tsx
Passes React Query context (client, meta) to chats.send(...).mutationFn, adds format to the messages effect dependency array, and refactors the title-override useLayoutEffect to use destructured setTitleOverride with matching cleanup and dependencies.
Memoized date-time helpers
.../utils/useDateTime.ts
Adds useCallback import and wraps toUtc, format, fromNow, toDate, and toTime with useCallback and dependency arrays.

Estimated code review effort: 2 (Simple) | ~12 minutes

Possibly related PRs

Suggested labels: Area/Frontend

Suggested reviewers: shayanmalinda

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is missing, so none of the required template sections are filled in. Add the required template sections: Purpose, Goals, Approach, User stories, Release note, and the other applicable fields.
Title check ❓ Inconclusive The title is too generic and does not describe the actual changes in the pull request. Use a concise title naming the main change, such as the feature, bug fix, or component affected.
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch v2

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Rashmika998
Rashmika998 merged commit bce1f38 into main Jul 6, 2026
2 checks passed
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.

3 participants