Skip to content

feat(dashboard): hide Sponsorship until there is an enquiry - #371

Open
harshtandiya wants to merge 1 commit into
version-2-dashboard-events-registrationsfrom
version-2-dashboard-minor-sponsor-hide
Open

feat(dashboard): hide Sponsorship until there is an enquiry#371
harshtandiya wants to merge 1 commit into
version-2-dashboard-events-registrationsfrom
version-2-dashboard-minor-sponsor-hide

Conversation

@harshtandiya

Copy link
Copy Markdown
Collaborator

The manage sidebar listed Sponsorship for everyone, but the section only has
anything to show once a user has filed an enquiry. The account tabs already
gate their Sponsorships tab on get_user_sponsorship_inquiries; the sidebar
now reads the same endpoint and drops the item when it comes back empty.

  • dashboard/src/data/sponsorships.tsuseMySponsorships(), v2 useCall,
    no cacheKey (it persists to IndexedDB and would outlive the session).
  • ManagerLayout.vuepersonalItems is a computed; the Sponsorship entry
    is spread in only when the call returns rows.

Gotchas:

  • /manage/sponsorship still resolves to the work-in-progress placeholder for
    anyone who types it. Hiding the item is the ask; a redirect can wait until
    the section has a real page.
  • The old e2e test reached the placeholder by clicking the sidebar item, which
    Administrator no longer sees. It now navigates directly, and a second test
    asserts the item is absent.

Not changed: the account tabs, the endpoint, or the placeholder route.

The manage sidebar showed Sponsorship to everyone, though the section only has
something to say once a user has filed an enquiry. Follow the account tabs and
read the same endpoint, dropping the item when it comes back empty.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

❌ UI Demo Check failed

This pull request changes the UI (2 file(s) under dashboard/src/),
but the description has no screenshot or demo. Reviewers should be able to see the
change without checking out the branch.

🛠️ How to fix

  • Edit the description and drag a screenshot or a short screen recording into it.
    Before/after images are ideal for visual tweaks.
  • Or apply the skip-demo label if a visual makes no sense here
    (pure refactor, copy change, dependency bump).

Either one re-runs this check automatically.

@greptile-apps

greptile-apps Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR conditionally shows the manage-sidebar Sponsorship entry when the current user has at least one sponsorship enquiry and updates the manage-access browser coverage accordingly.

  • Adds an uncached v2 sponsorship-enquiry data composable.
  • Converts personal sidebar items to a computed list gated by enquiry presence.
  • Preserves direct access to the placeholder route and tests sidebar absence for an enquiry-free account.

Confidence Score: 4/5

The PR appears safe to merge, with a non-blocking test-isolation issue that can make the new sidebar assertion fail against retained data.

The sidebar uses the established owner-scoped sponsorship endpoint correctly, while the new absence test assumes rather than creates an enquiry-free database state.

Files Needing Attention: e2e/tests/manage-access.spec.ts

Important Files Changed

Filename Overview
dashboard/src/data/sponsorships.ts Adds a session-scoped v2 call whose direct-array response matches the endpoint and existing dashboard data patterns.
dashboard/src/layouts/ManagerLayout.vue Makes personal navigation reactive and includes Sponsorship only when the owner-scoped endpoint returns rows.
e2e/tests/manage-access.spec.ts Preserves direct placeholder coverage and adds an absence assertion, but that assertion does not establish its required empty database state.

Fix all with Greploop Fix All in Claude Code Fix All in Codex

Prompt To Fix All With AI
### Issue 1
e2e/tests/manage-access.spec.ts:26
**Test assumes empty sponsorship state**

This assertion relies on the shared Administrator account having no sponsorship enquiries, but the persistent test database has no setup or cleanup that establishes that state. A retained Administrator-owned enquiry correctly renders the link and makes this test fail despite valid product behavior.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "feat(dashboard): hide Sponsorship until ..." | Re-trigger Greptile

await expect(page.getByRole("link", { name: "Talk Proposals" })).toBeVisible({
timeout: 15000,
});
await expect(page.getByRole("link", { name: "Sponsorship" })).toHaveCount(0);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Test assumes empty sponsorship state

This assertion relies on the shared Administrator account having no sponsorship enquiries, but the persistent test database has no setup or cleanup that establishes that state. A retained Administrator-owned enquiry correctly renders the link and makes this test fail despite valid product behavior.

Knowledge Base Used: Browser-Level E2E Test Harness

Prompt To Fix With AI
This is a comment left during a code review.
Path: e2e/tests/manage-access.spec.ts
Line: 26

Comment:
**Test assumes empty sponsorship state**

This assertion relies on the shared Administrator account having no sponsorship enquiries, but the persistent test database has no setup or cleanup that establishes that state. A retained Administrator-owned enquiry correctly renders the link and makes this test fail despite valid product behavior.

**Knowledge Base Used:** [Browser-Level E2E Test Harness](https://app.greptile.com/bwh-tech/-/custom-context/knowledge-base/bwhtech/buzz/-/docs/e2e-test-harness.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Claude Code Fix in Codex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant