Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
e103172
Add Concierge prompt box to home For You section
adamgrzybowski Aug 11, 2026
6af486b
Add attachment support to Concierge prompt box on Home
adamgrzybowski Aug 11, 2026
1c3ae70
Add Concierge prompt translations for non-English languages
adamgrzybowski Aug 12, 2026
ef3cde9
Use Expensify Neue font in Concierge prompt box input
adamgrzybowski Aug 12, 2026
4ed69f9
Add getTimeOfDayGreetingKey unit tests
adamgrzybowski Aug 12, 2026
9e438fe
Merge branch 'main' into @adamgrzybowski/home-ask-concierge
adamgrzybowski Aug 12, 2026
cb1e69e
Bump Mobile-Expensify submodule to match main
adamgrzybowski Aug 12, 2026
8b032f0
Mock ConciergePromptBox in ForYouSection test after merge
adamgrzybowski Aug 12, 2026
728b747
Fix stale Concierge history flash on side panel reopen
adamgrzybowski Aug 12, 2026
5b0b88d
Auto-grow Concierge prompt input up to ~5 lines
adamgrzybowski Aug 13, 2026
c9464be
Merge Time sensitive into the Concierge For You card
adamgrzybowski Aug 14, 2026
8931fba
Merge branch 'main' into @adamgrzybowski/home-ask-concierge
adamgrzybowski Aug 14, 2026
e9efacc
Fix ESLint errors in useTimeSensitiveItems and reset Mobile-Expensify…
adamgrzybowski Aug 14, 2026
2668d82
Merge branch 'main' into @adamgrzybowski/home-ask-concierge
adamgrzybowski Aug 17, 2026
7395679
Refactor ConciergePromptBox to use shared Composer with Enter-to-send
adamgrzybowski Aug 18, 2026
7fee4db
Add 8px space under Home section headlines
adamgrzybowski Aug 18, 2026
55f2038
Remove redundant displayName assignments from home components
adamgrzybowski Aug 18, 2026
134be74
Simplify targetReportID ternary in useAskConcierge
adamgrzybowski Aug 18, 2026
04062e9
Keep Concierge + menu open across Home layout breakpoint
adamgrzybowski Aug 18, 2026
bc0d5a6
Use short Concierge placeholder when long one would wrap
adamgrzybowski Aug 18, 2026
c33a8b9
Reuse shared composer styles in Concierge prompt box
adamgrzybowski Aug 19, 2026
7035c05
Fix Concierge placeholder flashing a wrapped long copy on load
adamgrzybowski Aug 19, 2026
4e459af
Sequence attachment modal close/confirm when confirm leaves screen
adamgrzybowski Aug 20, 2026
8cd34b0
Merge remote-tracking branch 'eorigin/main' into @adamgrzybowski/home…
adamgrzybowski Aug 20, 2026
8b0e7b8
Merge remote-tracking branch 'eorigin/main' into @adamgrzybowski/home…
adamgrzybowski Aug 20, 2026
15b655c
Merge remote-tracking branch 'eorigin/main' into @adamgrzybowski/home…
adamgrzybowski Aug 20, 2026
fd3c3ca
Anchor Concierge send button to the bottom like the composer
adamgrzybowski Aug 20, 2026
2efcb00
Always show Concierge box and empty For You for no-workspace users
adamgrzybowski Aug 21, 2026
9d2c9c5
Remove redundant explanatory comments
adamgrzybowski Aug 21, 2026
6d1a351
Rename isNativePlatform to isNative in normalizeFileObject
adamgrzybowski Aug 21, 2026
557979b
Merge remote-tracking branch 'eorigin/main' into @adamgrzybowski/home…
adamgrzybowski Aug 21, 2026
b92fa11
Add tests for concierge prompt box interaction
mhawryluk Aug 24, 2026
6447e34
Remove unnecessary comment
mhawryluk Aug 24, 2026
b9f48a1
Put the Getting started section below the For you on Home page
mhawryluk Aug 25, 2026
9ba4202
Merge branch 'main' into @adamgrzybowski/home-ask-concierge
mhawryluk Aug 25, 2026
49bacbd
Fix tests
mhawryluk Aug 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/CONST/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,7 @@ const CONST = {
FNS_TIMEZONE_FORMAT_STRING: "yyyy-MM-dd'T'HH:mm:ssXXX",
FNS_DB_FORMAT_STRING: 'yyyy-MM-dd HH:mm:ss.SSS',
LONG_DATE_FORMAT_WITH_WEEKDAY: 'eeee, MMMM d, yyyy',
LONG_DATE_FORMAT_WITH_WEEKDAY_WITHOUT_YEAR: 'eeee, MMMM d',
ORDINAL_DAY_OF_MONTH: 'do',
MONTH_DAY_YEAR_ORDINAL_FORMAT: 'MMMM do, yyyy',
SECONDS_PER_DAY: 24 * 60 * 60,
Expand Down
33 changes: 28 additions & 5 deletions src/components/Search/SearchRouter/useAskConcierge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,24 @@ import useSidePanelReportID from '@hooks/useSidePanelReportID';

import getNonEmptyStringOnyxID from '@libs/getNonEmptyStringOnyxID';

import {addComment} from '@userActions/Report';
import {addAttachmentWithComment, addComment} from '@userActions/Report';

import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import type {FileObject} from '@src/types/utils/Attachment';

/**
* Returns a callback that opens the side panel (or Concierge chat on native)
* and sends the provided search query as a message.
* Also returns a flag indicating whether the Ask Concierge item is ready to be displayed.
*
* @param forceConcierge Always target the Concierge report, ignoring the report the side panel currently maps to.
*/
function useAskConcierge() {
function useAskConcierge({forceConcierge = false}: {forceConcierge?: boolean} = {}) {
const sidePanelReportID = useSidePanelReportID();
const [conciergeReportID] = useOnyx(ONYXKEYS.CONCIERGE_REPORT_ID);
const {openConciergeAnywhere, isInSidePanel} = useOpenConciergeAnywhere();
const targetReportID = (isInSidePanel ? sidePanelReportID : undefined) ?? conciergeReportID;
const targetReportID = !forceConcierge && isInSidePanel && sidePanelReportID ? sidePanelReportID : conciergeReportID;
const [targetReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${getNonEmptyStringOnyxID(targetReportID)}`);
const {timezone, accountID: currentUserAccountID} = useCurrentUserPersonalDetails();
const delegateAccountID = useDelegateAccountID();
Expand All @@ -31,7 +34,7 @@ function useAskConcierge() {
if (!trimmedQuery || !shouldShowAskConcierge) {
return;
}
openConciergeAnywhere();
openConciergeAnywhere({forceConcierge});
addComment({
report: targetReport,
notifyReportID: targetReportID,
Expand All @@ -46,7 +49,27 @@ function useAskConcierge() {
});
};

return {askConcierge, shouldShowAskConcierge};
const askConciergeWithAttachment = (attachments: FileObject | FileObject[], searchQuery: string) => {
if (!shouldShowAskConcierge) {
return;
}
openConciergeAnywhere({forceConcierge});
addAttachmentWithComment({
report: targetReport,
notifyReportID: targetReportID,
ancestors: [],
attachments,
currentUserAccountID,
text: searchQuery.trim(),
timezone: timezone ?? CONST.DEFAULT_TIME_ZONE,
shouldPlaySound: true,
isInSidePanel,
delegateAccountID,
conciergeReportID,
});
};

return {askConcierge, askConciergeWithAttachment, shouldShowAskConcierge, conciergeTargetReportID: targetReportID};
}

export default useAskConcierge;
17 changes: 16 additions & 1 deletion src/hooks/useConciergeSidePanelReportActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,12 @@ function useConciergeSidePanelReportActions({
}
const filtered = actions.filter(isCurrentSessionAction);
if (filtered.length === 0) {
// Side panel: nothing matched the current session yet (e.g. just after reopen, before the new
// message propagates). Show the greeting instead of `actions` to avoid flashing stale history.
if (!isConciergeMainDM && conciergeGreetingAction) {
const createdAction = actions.find(isCreatedAction);
return createdAction ? [conciergeGreetingAction, createdAction] : [conciergeGreetingAction];
}
return actions;
}
if (conciergeGreetingAction) {
Expand All @@ -188,7 +194,16 @@ function useConciergeSidePanelReportActions({
}
return filtered;
},
[showConciergeSidePanelWelcome, conciergeGreetingAction, isConciergeHiddenHistory, showFullHistory, sessionStartTime, isCurrentSessionAction, hadUserMessageAtSessionStart],
[
showConciergeSidePanelWelcome,
conciergeGreetingAction,
isConciergeHiddenHistory,
showFullHistory,
sessionStartTime,
isCurrentSessionAction,
hadUserMessageAtSessionStart,
isConciergeMainDM,
],
);

const filteredVisibleActions = useMemo(() => filterActions(visibleReportActions), [filterActions, visibleReportActions]);
Expand Down
7 changes: 7 additions & 0 deletions src/languages/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1122,6 +1122,13 @@ const translations: TranslationDeepObject<typeof en> = {
emptyStateMessage: 'Erstellen Sie eine oder ziehen Sie eine Quittung hierher',
},
insightsSection: {chartUnavailable: 'Diagramm nicht verfügbar', notEnoughData: 'Wir haben noch nicht genügend Daten, um dieses Diagramm auszufüllen'},
conciergePrompt: {
goodMorning: ({name}: {name?: string}) => (name ? `Guten Morgen, ${name}.` : 'Guten Morgen.'),
goodAfternoon: ({name}: {name?: string}) => (name ? `Guten Tag, ${name}.` : 'Guten Tag.'),
goodEvening: ({name}: {name?: string}) => (name ? `Guten Abend, ${name}.` : 'Guten Abend.'),
inputPlaceholder: 'Bitten Sie Concierge, Ihre Ausgaben zu analysieren oder Unterstützung zu erhalten',
inputPlaceholderMobile: 'Stellen Sie Concierge eine Frage',
},
},
allSettingsScreen: {
subscription: 'Abonnement',
Expand Down
7 changes: 7 additions & 0 deletions src/languages/el.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1170,6 +1170,13 @@ const translations: TranslationDeepObject<typeof en> = {
chartUnavailable: 'Το γράφημα δεν είναι διαθέσιμο',
notEnoughData: 'Δεν έχουμε ακόμη αρκετά δεδομένα για να συμπληρώσουμε αυτό το γράφημα',
},
conciergePrompt: {
goodMorning: ({name}: {name?: string}) => (name ? `Καλημέρα, ${name}.` : 'Καλημέρα.'),
goodAfternoon: ({name}: {name?: string}) => (name ? `Καλησπέρα σας, ${name}.` : 'Καλό απόγευμα.'),
goodEvening: ({name}: {name?: string}) => (name ? `Καλησπέρα, ${name}.` : 'Καλησπέρα.'),
inputPlaceholder: 'Ζητήστε από το Concierge να αναλύσει τα έξοδά σας ή να λάβετε υποστήριξη',
inputPlaceholderMobile: 'Ρωτήστε το Concierge οτιδήποτε',
},
},
allSettingsScreen: {
subscription: 'Συνδρομή',
Expand Down
7 changes: 7 additions & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,13 @@ const translations = {
},
homePage: {
forYou: 'For you',
conciergePrompt: {
goodMorning: ({name}: {name?: string}) => (name ? `Good morning, ${name}.` : 'Good morning.'),
goodAfternoon: ({name}: {name?: string}) => (name ? `Good afternoon, ${name}.` : 'Good afternoon.'),
goodEvening: ({name}: {name?: string}) => (name ? `Good evening, ${name}.` : 'Good evening.'),
inputPlaceholder: 'Ask Concierge to analyze your expenses or get support',
inputPlaceholderMobile: 'Ask Concierge anything',
},
timeSensitiveSection: {
title: 'Time sensitive',
ctaFix: 'Fix',
Expand Down
7 changes: 7 additions & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1117,6 +1117,13 @@ const translations: TranslationDeepObject<typeof en> = {
emptyStateMessage: 'Crea uno o arrastra un recibo aquí',
},
insightsSection: {chartUnavailable: 'Gráfico no disponible', notEnoughData: 'Todavía no tenemos suficientes datos para completar este gráfico'},
conciergePrompt: {
goodMorning: ({name}: {name?: string}) => (name ? `Buenos días, ${name}.` : 'Buenos días.'),
goodAfternoon: ({name}: {name?: string}) => (name ? `Buenas tardes, ${name}.` : 'Buenas tardes.'),
goodEvening: ({name}: {name?: string}) => (name ? `Buenas noches, ${name}.` : 'Buenas noches.'),
inputPlaceholder: 'Pídele a Concierge que analice tus gastos o que te ayude',
inputPlaceholderMobile: 'Pregunta a Concierge cualquier cosa',
},
},
allSettingsScreen: {
subscription: 'Suscripcion',
Expand Down
7 changes: 7 additions & 0 deletions src/languages/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1125,6 +1125,13 @@ const translations: TranslationDeepObject<typeof en> = {
emptyStateMessage: 'Créez-en un ou faites glisser un reçu ici',
},
insightsSection: {chartUnavailable: 'Graphique indisponible', notEnoughData: 'Nous n’avons pas encore suffisamment de données pour remplir ce graphique'},
conciergePrompt: {
goodMorning: ({name}: {name?: string}) => (name ? `Bonjour, ${name}.` : 'Bonjour.'),
goodAfternoon: ({name}: {name?: string}) => (name ? `Bonjour, ${name}.` : 'Bon après-midi.'),
goodEvening: ({name}: {name?: string}) => (name ? `Bonsoir, ${name}.` : 'Bonsoir.'),
inputPlaceholder: 'Demander à Concierge d’analyser vos dépenses ou d’obtenir de l’aide',
inputPlaceholderMobile: 'Demander n’importe quoi à Concierge',
},
},
allSettingsScreen: {
subscription: 'Abonnement',
Expand Down
7 changes: 7 additions & 0 deletions src/languages/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1123,6 +1123,13 @@ const translations: TranslationDeepObject<typeof en> = {
emptyStateMessage: 'Creane una o trascina qui una ricevuta',
},
insightsSection: {chartUnavailable: 'Grafico non disponibile', notEnoughData: 'Non abbiamo ancora abbastanza dati per compilare questo grafico'},
conciergePrompt: {
goodMorning: ({name}: {name?: string}) => (name ? `Buongiorno, ${name}.` : 'Buongiorno.'),
goodAfternoon: ({name}: {name?: string}) => (name ? `Buon pomeriggio, ${name}.` : 'Buon pomeriggio.'),
goodEvening: ({name}: {name?: string}) => (name ? `Buonasera, ${name}.` : 'Buona sera.'),
inputPlaceholder: 'Chiedi a Concierge di analizzare le tue spese o chiedi supporto',
inputPlaceholderMobile: 'Chiedi qualsiasi cosa a Concierge',
},
},
allSettingsScreen: {
subscription: 'Abbonamento',
Expand Down
7 changes: 7 additions & 0 deletions src/languages/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1106,6 +1106,13 @@ const translations: TranslationDeepObject<typeof en> = {
emptyStateMessage: '新規作成するか、レシートをここにドラッグしてください',
},
insightsSection: {chartUnavailable: 'グラフを表示できません', notEnoughData: 'このチャートを表示するためのデータがまだ十分にありません'},
conciergePrompt: {
goodMorning: ({name}: {name?: string}) => (name ? `${name}さん、おはようございます。` : 'おはようございます。'),
goodAfternoon: ({name}: {name?: string}) => (name ? `${name}さん、こんにちは。` : 'こんにちは。'),
goodEvening: ({name}: {name?: string}) => (name ? `${name}さん、こんばんは。` : 'こんばんは。'),
inputPlaceholder: 'Concierge に経費の分析を依頼するか、サポートを受けます',
inputPlaceholderMobile: 'Concierge に何でも聞いてください',
},
},
allSettingsScreen: {
subscription: 'サブスクリプション',
Expand Down
7 changes: 7 additions & 0 deletions src/languages/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1121,6 +1121,13 @@ const translations: TranslationDeepObject<typeof en> = {
emptyStateMessage: 'Maak er een aan of sleep hier een bonnetje naartoe',
},
insightsSection: {chartUnavailable: 'Diagram niet beschikbaar', notEnoughData: 'We hebben nog niet genoeg gegevens om deze grafiek te vullen'},
conciergePrompt: {
goodMorning: ({name}: {name?: string}) => (name ? `Goedemorgen, ${name}.` : 'Goedemorgen.'),
goodAfternoon: ({name}: {name?: string}) => (name ? `Goedemiddag, ${name}.` : 'Goedemiddag.'),
goodEvening: ({name}: {name?: string}) => (name ? `Goedenavond, ${name}.` : 'Goedenavond.'),
inputPlaceholder: 'Vraag Concierge om je uitgaven te analyseren of om hulp te krijgen',
inputPlaceholderMobile: 'Stel Concierge alles gerust een vraag',
},
},
allSettingsScreen: {
subscription: 'Abonnement',
Expand Down
7 changes: 7 additions & 0 deletions src/languages/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1137,6 +1137,13 @@ const translations: TranslationDeepObject<typeof en> = {
emptyStateMessage: 'Utwórz jeden lub przeciągnij tu paragon',
},
insightsSection: {chartUnavailable: 'Wykres niedostępny', notEnoughData: 'Nie mamy jeszcze wystarczającej ilości danych, żeby wypełnić ten wykres'},
conciergePrompt: {
goodMorning: ({name}: {name?: string}) => (name ? `Dzień dobry, ${name}.` : 'Dzień dobry.'),
goodAfternoon: ({name}: {name?: string}) => (name ? `Dzień dobry, ${name}.` : 'Dzień dobry.'),
goodEvening: ({name}: {name?: string}) => (name ? `Dobry wieczór, ${name}.` : 'Dobry wieczór.'),
inputPlaceholder: 'Poproś Concierge o przeanalizowanie swoich wydatków lub uzyskaj pomoc',
inputPlaceholderMobile: 'Zapytaj Concierge o cokolwiek',
},
},
allSettingsScreen: {
subscription: 'Subskrypcja',
Expand Down
7 changes: 7 additions & 0 deletions src/languages/pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1121,6 +1121,13 @@ const translations: TranslationDeepObject<typeof en> = {
emptyStateMessage: 'Crie um ou arraste um recibo aqui',
},
insightsSection: {chartUnavailable: 'Gráfico indisponível', notEnoughData: 'Ainda não temos dados suficientes para preencher este gráfico'},
conciergePrompt: {
goodMorning: ({name}: {name?: string}) => (name ? `Bom dia, ${name}.` : 'Bom dia.'),
goodAfternoon: ({name}: {name?: string}) => (name ? `Boa tarde, ${name}.` : 'Boa tarde.'),
goodEvening: ({name}: {name?: string}) => (name ? `Boa noite, ${name}.` : 'Boa noite.'),
inputPlaceholder: 'Peça ao Concierge para analisar suas despesas ou obter suporte',
inputPlaceholderMobile: 'Pergunte qualquer coisa ao Concierge',
},
},
allSettingsScreen: {
subscription: 'Assinatura',
Expand Down
7 changes: 7 additions & 0 deletions src/languages/zh-hans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1077,6 +1077,13 @@ const translations: TranslationDeepObject<typeof en> = {
seeMore: ({count}: {count: number}) => `再查看 ${count} 个`,
recentlyAddedSection: {title: '最近添加', viewAll: '查看所有报销费用', emptyStateTitle: '最近没有报销记录', emptyStateMessage: '创建一个或将收据拖到这里'},
insightsSection: {chartUnavailable: '图表不可用', notEnoughData: '我们目前没有足够的数据来填充此图表'},
conciergePrompt: {
goodMorning: ({name}: {name?: string}) => (name ? `早上好,${name}。` : '早上好。'),
goodAfternoon: ({name}: {name?: string}) => (name ? `下午好,${name}。` : '下午好。'),
goodEvening: ({name}: {name?: string}) => (name ? `晚上好,${name}。` : '晚上好。'),
inputPlaceholder: '向 Concierge 请求分析你的报销或获取支持',
inputPlaceholderMobile: '向 Concierge 提问任何问题',
},
},
allSettingsScreen: {
subscription: '订阅',
Expand Down
26 changes: 26 additions & 0 deletions src/libs/DateUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,30 @@ function formatToLongDateWithWeekday(datetime: string | Date, dateFnsLocale: Dat
return format(new Date(datetime), CONST.DATE.LONG_DATE_FORMAT_WITH_WEEKDAY, {locale: dateFnsLocale});
}

/**
* Format date to a long date format with weekday but without the year
*
* @returns Sunday, July 9
*/
function formatToLongDateWithWeekdayWithoutYear(datetime: string | Date, dateFnsLocale: DateFnsLocale | undefined): string {
return format(new Date(datetime), CONST.DATE.LONG_DATE_FORMAT_WITH_WEEKDAY_WITHOUT_YEAR, {locale: dateFnsLocale});
}

/**
* Get the time-of-day greeting key based on the hour of the given (already timezone-adjusted) date.
* Ranges: morning 4am to 12pm, afternoon 12pm to 5pm, evening 5pm to 4am.
*/
function getTimeOfDayGreetingKey(date: Date): 'goodMorning' | 'goodAfternoon' | 'goodEvening' {
const hour = date.getHours();
if (hour >= 4 && hour < 12) {
return 'goodMorning';
}
if (hour >= 12 && hour < 17) {
return 'goodAfternoon';
}
return 'goodEvening';
}
Comment thread
adamgrzybowski marked this conversation as resolved.

/**
* Format date to a weekday format
*
Expand Down Expand Up @@ -1182,6 +1206,8 @@ const DateUtils = {
isDate,
formatToDayOfWeek,
formatToLongDateWithWeekday,
formatToLongDateWithWeekdayWithoutYear,
getTimeOfDayGreetingKey,
formatToLocalTime,
formatToReadableString,
getZoneAbbreviation,
Expand Down
4 changes: 2 additions & 2 deletions src/libs/fileDownload/FileUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -735,9 +735,9 @@ const normalizeFileObject = async (file: FileObject): Promise<FileObject> => {

const isAndroidNative = getPlatform() === CONST.PLATFORM.ANDROID;
const isIOSNative = getPlatform() === CONST.PLATFORM.IOS;
const isNativePlatform = isAndroidNative || isIOSNative;
const isNative = isAndroidNative || isIOSNative;

if (!isNativePlatform || 'size' in file) {
if (!isNative || 'size' in file) {
return file;
}

Expand Down
Loading
Loading