Relocate guided reporting from the header into durable project and overview surfaces. - Add Report entry points to Project General settings and Command Center Overview. - Preserve guided report modal context through a shared route helper. - Cover relocated controls and update dashboard guidance. Files changed: docs/dashboard-guide.md | 2 +- packages/dashboard/app/components/Header.tsx | 33 ++++------------------ .../dashboard/app/components/SettingsModal.tsx | 2 +- .../app/components/__tests__/Header.test.tsx | 7 +++++ .../components/command-center/CommandCenter.css | 32 +++++++++++++++++++++ .../components/command-center/CommandCenter.tsx | 30 +++++++++++++++++++- .../__tests__/CommandCenter.test.tsx | 11 ++++++++ .../settings/sections/GeneralSection.tsx | 21 ++++++++++++++ .../GeneralSection.aiUndoWorkflow.test.tsx | 20 +++++++++++-- packages/dashboard/app/utils/reportContextRefs.ts | 13 +++++++++ 10 files changed, 139 insertions(+), 32 deletions(-) Fusion-Task-Id: FN-8348 Fusion-Task-Lineage: add1b302-deab-4e17-be2f-832971c1c83d Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
14 lines
774 B
TypeScript
14 lines
774 B
TypeScript
/**
|
|
* FNXC:ReportPipeline 2026-08-02-00:00:
|
|
* FN-8348 moves report entry points from Header into Settings General and Command
|
|
* Center. Resolve task and agent context in this shared helper so each home keeps
|
|
* the same deep-link behavior without duplicating route parsing.
|
|
*/
|
|
export function resolveReportContextRefs(location: Pick<Location, "hash" | "search">): { taskId?: string; agentId?: string } | undefined {
|
|
const params = new URLSearchParams(location.search);
|
|
const hashTaskMatch = location.hash.match(/^#\/tasks\/([^/?#]+)/);
|
|
const taskId = hashTaskMatch?.[1] ? decodeURIComponent(hashTaskMatch[1]) : params.get("taskId") ?? undefined;
|
|
const agentId = params.get("agentId") ?? undefined;
|
|
return taskId || agentId ? { taskId, agentId } : undefined;
|
|
}
|