Skip to content

Ask Concierge: use the same experience in the Concierge side panel and remove side panel special cases #105497

Open

Description

@MelvinBot

Follow-up to Add ask Concierge screen (Expensify/App#100552), part of Ask Concierge.

Problem

The Ask Concierge experience only runs in the main Concierge DM. The Concierge side panel (the Help button) still uses its old session-based flow, gated by about a dozen isInSidePanel branches. As a result, the side panel:

Questions sent from the side panel already create their own thread. Only the UI and the step that opens the thread differ.

Solution

Use the same Ask Concierge experience in the side panel, then delete the side panel special cases. The only side panel branch that should remain is how the thread opens: Navigation.navigate in the main pane, openSidePanel({reportID}) in the side panel.

All links point to main at 0bdcade.

Branches to remove or unify

  1. useIsConciergeInboxDM.ts:10: drop !isInSidePanel. This one check turns off the welcome screen, history toggle, placeholder, and centered layout in the side panel.
  2. useReportActionsVisibility.ts:60-129: stop filtering through the side panel hook, and always use showConciergeMainDMHistory. Remove isConciergeSidePanel, isConciergeHiddenHistory, showConciergeSidePanelWelcome, showFullHistory, and hasPreviousMessages from the result.
  3. ReportActionsList.tsx: remove the hidden-history fields, sessionStartTime (L162), newMessageBoundaryTime (L225), the draft check (L254), and the Show history button (L556-564).
  4. useReportActionsListModel.ts and ReportActionsListContext.tsx:99-110: remove the side panel readiness signals and skeleton branches.
  5. HeaderView.tsx: drop !isInSidePanel from the subtitle (L203) and from the New chat button (L527, L563). Make startNewConciergeChat (L332-335) call openSidePanel({reportID: conciergeReportID}) when in the side panel, so it doesn't navigate the main pane.
  6. useComposerSubmit.ts:101-113 and useAskConcierge.tsx: drop !isInSidePanel from the task-creation branch. Move "open the new thread" into one shared helper or callback instead of the duplicated shouldNavigateToConciergeThread / openSidePanel branches.
  7. useShouldSuppressConciergeIndicators.tsx: suppress indicators in the Concierge DM on every surface.
  8. SidePanelContextProvider.tsx: remove sessionStartTime once nothing reads it.

Code that becomes dead

  • useConciergeSidePanelReportActions.ts (whole file) and its test
  • ShowPreviousMessagesButton.tsx and its test
  • buildConciergeGreetingReportAction, CONST.CONCIERGE_GREETING_ACTION_ID, and the greeting-action handling in ReportActionItem, useUnreadMarker, and shouldDisplayNewMarkerOnReportAction
  • The newMessageBoundaryTime parameter in useUnreadMarker and shouldDisplayNewMarkerOnReportAction
  • The common.concierge.greeting and common.concierge.showHistory strings in every locale
  • useIsConciergeInboxDM, if inlined

Keep

These side panel branches are unrelated to the ask flow: page context and pageHTML sent to Concierge, telemetry source, useSidePanelReportID (admins room default), and the header close/back layout.

Things to decide

  • Shared history state. ConciergeChatHistoryProvider is mounted once app-wide. On wide screens the side panel and the main DM can both be open, so expanding history in one expands it in the other. Decide whether that's OK or whether the state should be per surface.
  • Layout. Check the welcome screen and composer centering in the narrow side panel on wide screens, where shouldUseNarrowLayout is false.

Related

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions