fix(web): group prompt detail results by platform by VrtxOmega · Pull Request #237 · ansvisor/ansvisor · GitHub
Skip to content

fix(web): group prompt detail results by platform#237

Merged
gkhngyk merged 1 commit into
ansvisor:mainfrom
VrtxOmega:fix/prompt-detail-platform-groups-236
Jun 12, 2026
Merged

fix(web): group prompt detail results by platform#237
gkhngyk merged 1 commit into
ansvisor:mainfrom
VrtxOmega:fix/prompt-detail-platform-groups-236

Conversation

@VrtxOmega

Copy link
Copy Markdown
Contributor

Summary

  • Extract the prompt detail page platform grouping helper into a local module, mirroring the accepted insights grouping pattern from fix(web): group insights results by platform #235.
  • Group prompt detail results by platform only, so provider model slug changes do not split one logical platform into duplicate cards.
  • Keep the group model/region metadata sourced from the latest run and add Vitest coverage for slug drift plus distinct-platform separation.

Related issue

Closes #236

Why

The prompt detail page had its own groupByPlatform() copy that keyed groups by platform|modelUsed. When a provider slug drifted over time, the same platform could appear as two cards even though it was the same logical platform history.

Validation

  • corepack yarn install --frozen-lockfile
  • corepack yarn test 'src/app/[locale]/(dashboard)/dashboard/prompts/[id]/grouping.test.ts'
  • corepack yarn prettier --check 'src/app/[locale]/(dashboard)/dashboard/prompts/[id]/page.tsx' 'src/app/[locale]/(dashboard)/dashboard/prompts/[id]/grouping.ts' 'src/app/[locale]/(dashboard)/dashboard/prompts/[id]/grouping.test.ts'
  • corepack yarn eslint 'src/app/[locale]/(dashboard)/dashboard/prompts/[id]/page.tsx' 'src/app/[locale]/(dashboard)/dashboard/prompts/[id]/grouping.ts' 'src/app/[locale]/(dashboard)/dashboard/prompts/[id]/grouping.test.ts'
  • corepack yarn test
  • corepack yarn typecheck
  • corepack yarn format:check
  • corepack yarn lint (0 errors; existing unrelated warnings remain in other files)
  • git diff --cached --check
  • git diff --check HEAD~1..HEAD

Scope

Display/grouping layer only. No data fetching, RPC, or stored data changes.

@gkhngyk gkhngyk merged commit dc7cb84 into ansvisor:main Jun 12, 2026
4 checks passed
@VrtxOmega

Copy link
Copy Markdown
Contributor Author

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.

bug(prompts): duplicate platform groups on the prompt detail page when a model slug changes

2 participants