Skip to content

feat(projects): show ready video availability - #164

Merged
HazAT merged 3 commits into
masterfrom
feat/ready-video-filter
Aug 22, 2026
Merged

feat(projects): show ready video availability#164
HazAT merged 3 commits into
masterfrom
feat/ready-video-filter

Conversation

@sfanahata

Copy link
Copy Markdown
Contributor

Summary

  • expose whether each project has a ready, non-retired, playable video
  • show a has video label in grid and list views
  • add a server-backed Has video project filter

Verification

  • npm test
  • npm run typecheck
  • npm run lint
  • npm run format:check
  • npm run build
  • npm run deploy:dry-run -- --containers-rollout=none

Comment thread src/app/routes/ProjectsPage.tsx
Merge current project counts, group navigation, personal quicklinks, dependency updates, and media fixes into the ready-video branch. Preserve both test suites and apply the video predicate to filtered badge counts as well as the result list.
Comment on lines +215 to +218
if (options.hasVideo) {
conditions.push(readyVideoExistsSql);
countConditions.push(readyVideoExistsSql);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: The 'Has video' filter for projects is incorrectly applied to the count for ideas, causing the idea count to show 0 when the filter is active.
Severity: MEDIUM

Suggested Fix

The readyVideoExistsSql condition should only be applied to the main query's conditions list, not the countConditions list. This will ensure that filtering by video only affects the list of projects returned, while the counts for both projects and ideas in the tabs remain unfiltered by the video criteria, reflecting the total numbers for the selected year.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: src/worker/repositories/projects.ts#L215-L218

Potential issue: When a user filters projects by the 'Has video' option, the query
incorrectly applies this filter to the count of 'ideas' as well. The
`readyVideoExistsSql` condition is added to `countConditions`, which is used to
calculate counts for both projects and ideas. However, ideas cannot have videos, and the
'Has video' filter is only visible on the projects tab. This causes the UI to display an
incorrect count of 0 for ideas when the video filter is active, leading to user
confusion as they will see 'Ideas (0)' even when ideas are present.

@HazAT
HazAT merged commit 7facc26 into master Aug 22, 2026
13 checks passed
@HazAT
HazAT deleted the feat/ready-video-filter branch August 22, 2026 07:12
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.

3 participants