Repository navigation
Description
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:
- shows a fake "Hi there, how can I help?" greeting and a
Show historybutton instead of the welcome screen andView chat historytoggle - hides the
New chatbutton in Concierge threads (reported in New chat button is not shown in thread after sending message to Concierge from Help button) - doesn't show the
Your personal AI assistantsubtitle - shows Concierge indicators that the main DM suppresses
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
useIsConciergeInboxDM.ts:10: drop!isInSidePanel. This one check turns off the welcome screen, history toggle, placeholder, and centered layout in the side panel.useReportActionsVisibility.ts:60-129: stop filtering through the side panel hook, and always useshowConciergeMainDMHistory. RemoveisConciergeSidePanel,isConciergeHiddenHistory,showConciergeSidePanelWelcome,showFullHistory, andhasPreviousMessagesfrom the result.ReportActionsList.tsx: remove the hidden-history fields,sessionStartTime(L162),newMessageBoundaryTime(L225), the draft check (L254), and theShow historybutton (L556-564).useReportActionsListModel.tsandReportActionsListContext.tsx:99-110: remove the side panel readiness signals and skeleton branches.HeaderView.tsx: drop!isInSidePanelfrom the subtitle (L203) and from theNew chatbutton (L527, L563). MakestartNewConciergeChat(L332-335) callopenSidePanel({reportID: conciergeReportID})when in the side panel, so it doesn't navigate the main pane.useComposerSubmit.ts:101-113anduseAskConcierge.tsx: drop!isInSidePanelfrom the task-creation branch. Move "open the new thread" into one shared helper or callback instead of the duplicatedshouldNavigateToConciergeThread/openSidePanelbranches.useShouldSuppressConciergeIndicators.tsx: suppress indicators in the Concierge DM on every surface.SidePanelContextProvider.tsx: removesessionStartTimeonce nothing reads it.
Code that becomes dead
useConciergeSidePanelReportActions.ts(whole file) and its testShowPreviousMessagesButton.tsxand its testbuildConciergeGreetingReportAction,CONST.CONCIERGE_GREETING_ACTION_ID, and the greeting-action handling inReportActionItem,useUnreadMarker, andshouldDisplayNewMarkerOnReportAction- The
newMessageBoundaryTimeparameter inuseUnreadMarkerandshouldDisplayNewMarkerOnReportAction - The
common.concierge.greetingandcommon.concierge.showHistorystrings 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.
ConciergeChatHistoryProvideris 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
shouldUseNarrowLayoutis false.
Related
- Ask Concierge: animate state transitions and bring the same UI to the RHP overlaps with this issue's UI work. Its "Make the RHP match" section can point here.
Activity