Repository navigation
Fix: Concierge Anywhere can act on the viewed report on native (source report threading) #99337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
6214a75
dc55f04
768bfdd
9dd268d
3eba319
2d7bb1f
925d0c8
972e760
87bedf8
72e1f2a
1909aeb
6977a7c
42a24e1
b4f98e9
245e890
0dc8ea2
db9fa33
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2272,11 +2272,17 @@ const config: LinkingOptions<RootNavigatorParamList>['config'] = { | |
| // eslint-disable-next-line | ||
| reportID: (reportID: string | undefined) => reportID ?? '', | ||
| secureKey: (secureKey: string | undefined) => secureKey ?? '', | ||
| // parse must return a string, so an absent sourceReportID maps to an empty string, which consumers read as absent. | ||
| // eslint-disable-next-line rulesdir/no-default-id-values | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ❌ CONSISTENCY-5 (docs)The added // A missing sourceReportID must stringify/parse to '' so the route param round-trips cleanly.
// eslint-disable-next-line rulesdir/no-default-id-values
sourceReportID: (sourceReportID: string | undefined) => sourceReportID ?? '',Reviewed at: 972e760 | Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @MelvinBot address this, this and this
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done in 72e1f2a — added a justification above each disable ( // parse must return a string, so an absent sourceReportID maps to an empty string, which consumers read as absent.
// eslint-disable-next-line rulesdir/no-default-id-values
sourceReportID: (sourceReportID: string | undefined) => sourceReportID ?? '',I kept the justification above the |
||
| sourceReportID: (sourceReportID: string | undefined) => sourceReportID ?? '', | ||
| }, | ||
| stringify: { | ||
| // eslint-disable-next-line | ||
| reportID: (reportID: string | undefined) => reportID ?? '', | ||
| secureKey: (secureKey: string | undefined) => secureKey ?? '', | ||
| // stringify must return a string, so an absent sourceReportID maps to an empty string, which drops it from the route. | ||
| // eslint-disable-next-line rulesdir/no-default-id-values | ||
| sourceReportID: (sourceReportID: string | undefined) => sourceReportID ?? '', | ||
| }, | ||
| }, | ||
| }, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When Help is pressed outside the Inbox report view, such as from
SearchPageHeaderNarrow/Wideor a settings/workspaceTopBar, this same button still runs, whilegetTopmostReportId()scans the inactive Reports split navigator and returns its last-opened report. That stale ID is then sent as Concierge context, so a prompt opened from Search or settings can inspect or modify an unrelated report; only attach the source when the Reports split navigator is currently active (for example, using the already-gated central-pane helper).Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MelvinBot Please verify this comment. I think this behavior occurs on web as well. If so, I don't think this is a bug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verified —
dmkt9is right. Web already behaves this way, so this isn't a bug this PR introduces.Web's side panel context resolves to
currentRHPReportID ?? currentReportID(useSidePanelContext.ts:43), andcurrentReportIDis set fromNavigation.getTopmostReportId(state)— the same ungated helper the native button calls. Opening Help from Search or settings on web sends the same last-opened report.Evidence
1. The helper is not gated on the active navigator.
getTopmostReportParams.ts:24-35usesfindLastto grab the lastREPORTS_SPLIT_NAVIGATORanywhere in the state and its lastREPORTscreen. It never checks whether that navigator is focused. Both platforms inherit this.2. Web deliberately keeps the stale ID on settings.
useCurrentReportID.tsx:69-75early-returns for anySettings_screen, with the comment "Make sure we don't make the reportID undefined when switching between the chat list and settings tab." So on web, navigating to settings preserves the previous report as the side panel's context by design — exactly the behavior flagged here.3. Same button placement on both.
TopBar.tsx:87rendersSidePanelButtonfor both platforms, and the only gate isshouldHideHelpButton(onboarding / anonymous / 2FA), which has nothing to do with which navigator is active.On the suggested "already-gated central-pane helper" — that's
getFocusedReportId/getFocusedReportParams, which does respect the active tab viagetActiveTabRoute. Web's side panel does not use it. Switching only native to it would make native stricter than web, not consistent with it.One genuine difference (doesn't change the verdict): native freezes
sourceReportIDinto the route param at press time, while web re-readscurrentReportIDlive. At the moment Help is pressed from Search or settings both resolve to the same report, so the scenario described here is identical on both.If the ungated lookup is worth tightening, it should change both platforms together in its own PR rather than only the native path here.
view run