feat(projects): show ready video availability - #164
Merged
Conversation
vaind
approved these changes
Aug 21, 2026
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); | ||
| } |
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
has videolabel in grid and list viewsHas videoproject filterVerification
npm testnpm run typechecknpm run lintnpm run format:checknpm run buildnpm run deploy:dry-run -- --containers-rollout=none