Skip to content

[$250] Hide the chat history when Concierge is opened up in the right hand pane #81587

@thienlnam

Description

@thienlnam
Image

Goal: Make ConciergeAnywhere feel like a fresh, clean entry point every time it’s opened in the right hand pane:

  • Hide existing chat history every time the RHP is opened/re-opened
  • Show a canned welcome message (virtual / frontend-only) like “Hi there, I'm Concierge. How can I help?” each time it opens
  • Once the user sends their first message, the canned welcome should stop showing (for that open session / view).

After user sends a message

  • The canned welcome message disappears (no longer rendered).
  • The chat proceeds normally (showing messages that occur after the user starts interacting in that open session).

On open / re-open ConciergeAnywhere (RHP)

  • The chat surface should look “new” (no scrollback shown).

  • Pressing the show previous messages will just show all the previous messages from the chat

  • Edge case:

  • If there are no previous messages from the user, we should not show this hidden button

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022019493293031450348
  • Upwork Job ID: 2019493293031450348
  • Last Price Increase: 2026-02-05
Issue OwnerCurrent Issue Owner: @parasharrajat

Key Files

  • [src/pages/inbox/report/ReportActionsView.tsx](src/pages/inbox/report/ReportActionsView.tsx) - Main report actions container
  • [src/pages/inbox/report/ReportActionsList.tsx](src/pages/inbox/report/ReportActionsList.tsx) - Message list rendering
  • [src/components/SidePanel/SidePanelContextProvider.tsx](src/components/SidePanel/SidePanelContextProvider.tsx) - Side panel state
  • [src/libs/ReportUtils.ts](src/libs/ReportUtils.ts) - isConciergeChatReport() utility
  • [src/languages/en.ts](src/languages/en.ts) - Translation strings

Implementation Steps

1. Add Translation Strings

Add new translation key for the virtual welcome message in all language files:

// src/languages/en.ts
concierge: {
    sidePanelGreeting: "Hi there, I'm Concierge. How can I help?",
    showPreviousMessages: 'Show previous messages',
}

2. Create ConciergeSidePanelWelcome Component

Create new component at src/components/ConciergeSidePanelWelcome.tsx:

  • Display Concierge avatar
  • Show greeting message from translations
  • Use existing styling patterns from ReportWelcomeText.tsx
  • Conditionally, hide once user sends first message

3. Modify ReportActionsList to Support Hidden History Mode

In src/pages/inbox/report/ReportActionsList.tsx:

  • Add new props: isConciergeSidePanel, showHistoryHidden, onShowPreviousMessages
  • Track sessionStartTimestamp using useRef - set when component mounts in side panel mode
  • Filter sortedVisibleReportActions to only show messages with created > sessionStartTimestamp when showHistoryHidden is true
  • Replace ListFooterComponent with "Show previous messages" button when history is hidden

4. Track Side Panel Session State

In src/pages/inbox/report/ReportActionsView.tsx:

  • Add state: hasUserSentMessage (boolean)
  • Add state: showFullHistory (boolean)
  • Determine isConciergeSidePanel using isConciergeChatReport() and isInSidePanel prop
  • Pass onMessageSent callback to ReportActionCompose to update hasUserSentMessage
  • Reset states when side panel opens (use useEffect with dependency on side panel open state)

5. Conditionally Render Welcome Message

In ReportActionsView.tsx or ReportActionsList.tsx:

  • When isConciergeSidePanel && !hasUserSentMessage && !showFullHistory:
    • Render ConciergeSidePanelWelcome component instead of/before the message list
    • Hide the ListFooterComponent skeleton loader
  • When hasUserSentMessage:
    • Hide ConciergeSidePanelWelcome
    • Show messages from current session only

6. Implement "Show Previous Messages" Button

Create button component that:

  • Appears at the bottom of the list (where footer normally is) when history is hidden
  • On press, sets showFullHistory = true and calls loadOlderChats(true)
  • Use existing Button component with appropriate styling

7. Pass isInSidePanel Through Component Hierarchy

Ensure isInSidePanel prop flows through:

  • ReportScreenReportActionsViewReportActionsList

The isInSidePanel prop already exists in ReportScreen.tsx (line 127) and flows to ReportFooter.

Manual QA

  • Opening Concierge in side panel shows welcome message, no history
  • Sending first message hides welcome message, shows only that message
  • "Show previous messages" button appears and loads full history
  • Closing and reopening side panel resets to fresh state
  • Normal Concierge chat (not in side panel) works unchanged
  • Translations work in all supported languages

Note: Actual proposal might vary - please validate the above for accuracy.

Metadata

Metadata

Labels

DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorImprovementItem broken or needs improvement.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions