feat(team): sortable Individuals table with URL-persisted sort (GLOOK-12)#53
Conversation
Extracts developer table into a reusable component from team page. Supports URL-persisted column sorting (devsort/devdir keys) with optional Jira and spend columns. Shows absolute impact rank when filtering or sorting diverges from server impact order. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Review Loop — 2 Personas, 1 IterationReviewers
FindingsCritical[Critical] The Jira tooltip's style block computes The commit tooltip ( Fix: In Important[Important]
Fix: Add a JSDoc comment to the [Important] The column displays Fix: Either (a) rename the column header to "Lines +" to match the actual sort key, or (b) add a Suggestions / Deferred
Loop 1 Summary
VerdictSafe to merge with noted fixes. The component extraction is clean, pattern-consistent with |
Smartling Code ReviewIssues🟡 warning
🟡 warning
A non-2xx response (401, 500) is silently treated as data and stored in cache. Add a response-status check: const res = await fetch(`/api/report/${reportId}/commits?login=${login}`);
if (!res.ok) throw new Error(res.statusText);
const rows = await res.json();Same issue exists in 🟡 warning
GitHub logins are constrained to alphanumeric/hyphens so exploitability is low, but use 🟡 warning
If the tooltip unmounts while the 200ms hide timer is pending, useEffect(() => () => { if (hideTimeout.current) clearTimeout(hideTimeout.current); }, []);Same issue in 🟡 warning
If a previous hover left 🟡 warning
🔵 suggestion
A shared 🔵 suggestion
Define minimal interfaces ( 🔵 suggestion
if (av === bv) return (a.github_name || a.github_login).localeCompare(...)Likely intentional as a stable tiebreaker, but worth a comment to prevent future confusion. 🟣 question
Depending on whether 🟣 question
If a user bookmarks RecommendationsDeduplicate tooltip components. The near-identical Harden the fetch path. Both tooltip components lack HTTP error checking and URL encoding — fix as a pair so one isn't missed. Atomic URL sort state. The two-write pattern in AssessmentReady to merge? No |
…cleanup, Lines+ rename, key fallback
Summary
?devsort=&devdir=) — survives reload and produces shareable links3 (7)— 3rd by commits, 7th by impact)impact_score DESCto match the existing server orderImplementation
Extracted the inlined developer table IIFE from
page.tsxinto a newdev-table.tsxcomponent — mirroring the existingteam-table.tsxpattern. All helper subcomponents (CommitCountWithTooltip,JiraCountWithTooltip, badge components) moved to the new file.page.tsxloses ~390 lines and gains a single<DevTable>call.Test plan
🤖 Generated with Claude Code