Skip to content

feat(reports): add onboarding empty state for first-time users #817#1222

Merged
utksh1 merged 4 commits into
utksh1:mainfrom
NaitikVerma6776:feat/reports-onboarding-empty-state
Jun 24, 2026
Merged

feat(reports): add onboarding empty state for first-time users #817#1222
utksh1 merged 4 commits into
utksh1:mainfrom
NaitikVerma6776:feat/reports-onboarding-empty-state

Conversation

@NaitikVerma6776

Copy link
Copy Markdown
Collaborator

Description

Added a dedicated onboarding empty state for the Reports page. Previously, users with no reports saw the same "Archive Isolated // No entries match the selected filters" message used when filters hide existing reports. This was misleading for first-time users because there were no reports to filter in the first place.

Changes

  • Added a distinct onboarding empty state shown only when reports.length === 0
  • Displayed a "No Briefings Yet" message with a Launch_First_Scan call-to-action linking to /toolkit
  • Preserved the existing "Archive Isolated" empty state for cases where reports exist but current filters hide them
  • Updated the existing test that previously expected the old behavior when no reports exist

No layout or visual redesign was introduced. The implementation reuses the existing neo-brutalist empty-state styling already present on the Reports page.

Related Issues

Closes #817

Type of Change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Added frontend/testing/unit/pages/Reports.onboarding.test.tsx with 4 focused tests:

  • Onboarding message is shown when there are zero reports
  • Call-to-action link points to /toolkit
  • Onboarding message does not appear when reports exist but filters hide them (existing "Archive Isolated" behavior remains unchanged)
  • Onboarding message is hidden once reports are loaded

Test Results

  • All 4 new onboarding tests passed successfully

Note: Reports.test.tsx and Reports.preferredFormat.test.tsx contain 12 pre-existing failing tests unrelated to this change. The same failures occur when this patch is removed, indicating an existing issue outside the scope of this contribution. This PR intentionally remains focused on the onboarding empty-state enhancement.

Checklist

  • My code follows the code style of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • My changes generate no new warnings.

@NaitikVerma6776 NaitikVerma6776 changed the title feat(reports): add onboarding empty state for first-time users with n…#817 feat(reports): add onboarding empty state for first-time users #817 Jun 23, 2026
@NaitikVerma6776

Copy link
Copy Markdown
Collaborator Author

heyy @utksh1 ,the frontend-checks failure (multiple elements matching role "button" name /^pdf$/i in Reports.test.tsx) is a pre-existing issue on main itself — there are now two PDF-labeled buttons in Reports.tsx (a newer green "PDF" header button and the existing lowercase "pdf" per-report export button), introduced by an earlier merge unrelated to this PR. Confirmed via git diff against upstream/main that this duplicate button exists identically on main with or without my changes. Happy to open a separate fix for the test selector ambiguity if useful, but keeping this PR scoped to the onboarding empty state as requested.

@utksh1 utksh1 merged commit 18e5101 into utksh1:main Jun 24, 2026
12 checks passed
@utksh1 utksh1 added the gssoc:approved Admin validation: approved for GSSoC scoring label Jun 24, 2026
utksh1 added a commit that referenced this pull request Jun 25, 2026
, #1234, #1232, #1231, #1230, #1229, #1228, #1222, #1221, #1254, #1252, #1251, #1250, #1242, #1255, #1090, #1097, #1112)

Reverting all PR merges performed during this session to restore repository
to pre-session state. This reverts commits:
- e376276 (#1255)
- 18e5101 (#1222)
- e516dd5 (#1230)
- be400fa (#1235)
- d522e9a (#1243)
- bc0b1cd (#1090)
- de56660 (#1097)
- c2a5a53 (#1112)
- eb30d33 (#1254)
- f2a67f7 (#1250)
- 6579112 (#1251)
- 8751d92 (#1252)
- 3ebc935 (#1221)
- 6f5a936 (#1228)
- da15da4 (#1229)
- b66a5b0 (#1231)
- 775c5c2 (#1232)
- b529ddb (#1234)
- 965b001 (#1241)
- d46e573 (#1242)
- dd09955 (#1240)

All PRs are also being reopened and gssoc labels removed.
@utksh1 utksh1 added level:beginner 20 pts difficulty label for small beginner-friendly PRs type:feature Feature work category bonus label area:frontend Frontend React/UI work gssoc:approved Admin validation: approved for GSSoC scoring and removed gssoc:approved Admin validation: approved for GSSoC scoring labels Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:frontend Frontend React/UI work gssoc:approved Admin validation: approved for GSSoC scoring level:beginner 20 pts difficulty label for small beginner-friendly PRs type:feature Feature work category bonus label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] Add onboarding empty state to Reports page

2 participants