[codex] Board UX: priority sorting, epic cards, deferred filtering#21
[codex] Board UX: priority sorting, epic cards, deferred filtering#21
Conversation
Change listIssues() ORDER BY to P0→P3 priority then updated_at DESC. Add hideDeferred option that filters defer_until > now. getBoard() now passes hideDeferred:true. Covers td-628268 backend half. 5 new tests: priority sort order, deferred hide/show, board variants.
…column collapse td-628268: StatusColumn renders flat (no groupIssuesWithChildren), issues arrive priority-sorted from backend. td-b21b0f: Epic cards show open child count badge (global count from tdIssues). No inline child expansion; clicking epic opens detail modal. td-bbc52a: IssueCard redesigned — full-width title, colored priority pill bottom-left (P0=red, P1=orange, P2=muted, P3=dim), muted ID bottom-right. Left border and tags removed. groupIssuesWithChildren kept for list view. td-ff29f1: Empty columns collapse to clickable vertical strip. Closed column shows only last-3-days by default with 'Show N older' reveal button. Min/max-width removed; flex distributes naturally.
LayoutGrid icon button in TerminalSession title bar, before the Info button. Visible when td is enabled for the project. One-click board access from any session view without hunting through the sidebar.
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly improves the Board user experience by implementing priority-based sorting and deferred task filtering, allowing users to focus on the most relevant tasks. It also refines the display of epic cards to provide a clearer overview of their child tasks. Additionally, the PR addresses two critical UI regressions, ensuring consistent visibility of the task board button and a more intuitive label for revealing closed tasks, thereby enhancing overall usability and adherence to design specifications. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request delivers significant UX enhancements for the task board, such as priority sorting, deferred task filtering, and improved epic card presentation. It also fixes two UI regressions related to the task board button visibility and 'Show more' text, backed by new regression tests. The backend and frontend changes are well-executed. My feedback includes one suggestion to improve code readability by replacing a magic number with its calculation for better maintainability.
| if (issues.length === 0) setIsCollapsed(true) | ||
| }, [issues.length]) | ||
|
|
||
| const threeDaysAgo = new Date(Date.now() - 3 * 86_400_000).toISOString() |
There was a problem hiding this comment.
Using a magic number like 86_400_000 for milliseconds in a day makes the code less readable. It's better to either use the calculation directly or define a constant for it to improve clarity and maintainability.
| const threeDaysAgo = new Date(Date.now() - 3 * 86_400_000).toISOString() | |
| const threeDaysAgo = new Date(Date.now() - 3 * 24 * 60 * 60 * 1000).toISOString() |
Code Review — Board UX: priority sorting, epic cards, deferred filteringOverall this is clean, well-scoped work. The backend changes in Bugs1. tdIssues.forEach(issue => {
if (issue.parent_id && issue.status !== 'closed') {
counts.set(issue.parent_id, (counts.get(issue.parent_id) ?? 0) + 1)
}
})Soft-deleted children ( if (issue.parent_id && issue.status !== 'closed' && !issue.deleted_at) {2. All columns start collapsed on initial load ( const [isCollapsed, setIsCollapsed] = useState(issues.length === 0)
useEffect(() => {
if (issues.length === 0) setIsCollapsed(true)
}, [issues.length])
// Only collapse empty columns; let populated ones start expanded
useEffect(() => {
setIsCollapsed(issues.length === 0)
}, [issues.length])Medium issues3.
4. expect(source).not.toContain('{tdStatus?.projectState?.enabled && (')This breaks on any whitespace or formatting change, and doesn't test actual rendered behaviour. It's also coupled to Minor5. issues.filter(i => (i.closed_at ?? '') >= threeDaysAgo)An issue in 6. Move it inside a const threeDaysAgo = useMemo(
() => new Date(Date.now() - 3 * 86_400_000).toISOString(),
[]
)Positives
Items 1 and 2 are the most important to address before merging. The rest are polish. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1322d15d53
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| const threeDaysAgo = new Date(Date.now() - 3 * 86_400_000).toISOString() | ||
| const visibleIssues = (status.key === 'closed' && !showAllClosed) | ||
| ? issues.filter(i => (i.closed_at ?? '') >= threeDaysAgo) |
There was a problem hiding this comment.
Compare closed timestamps as dates, not raw strings
The closed-column reveal logic is doing a lexical string comparison between closed_at and threeDaysAgo, but threeDaysAgo is ISO (...T...Z) while SQLite DATETIME values are typically space-separated (YYYY-MM-DD HH:MM:SS); this causes recent items on the cutoff date to be treated as older and hidden behind “Show more”. In practice, closed tasks within the last 3 days can disappear from the default view depending on timestamp format, so this should parse/normalize timestamps before comparing.
Useful? React with 👍 / 👎.
Summary
This PR completes
td-f66afd(Board UX: priority sorting, epic cards, deferred filtering) and includes a follow-up rejection fix for two UI acceptance gaps.User impact:
Root Cause
The initial implementation passed core backend acceptance but missed two explicit frontend details called out in review:
tdStatus?.projectState?.enabled.Show {N} olderinstead of the required plainShow more.A second rejection was workflow-only: the epic was submitted while child tasks remained
in_reviewand not yet closed.What Changed
Backend and board behavior work (already implemented on this branch):
Targeted rejection fix in this commit:
client/src/components/TerminalSession.tsx).Show more(client/src/components/TaskBoard.tsx).client/src/components/BoardUxRegression.test.ts).Workflow completion:
td-ff29f1,td-c6ca47) so epic state could cascade correctly.Validation
bun run test -- client/src/components/BoardUxRegression.test.tsbun run testBoth passed in this branch before submission.
Notes
.cacd-startup-*.sh) exists in the worktree and is intentionally not part of this PR.