Skip to content

fix(team-view): revert heatmap column growth; member popup links to the IC page#200

Merged
mitasovr merged 2 commits into
mainfrom
fix/members-heatmap-popup-links
Jul 15, 2026
Merged

fix(team-view): revert heatmap column growth; member popup links to the IC page#200
mitasovr merged 2 commits into
mainfrom
fix/members-heatmap-popup-links

Conversation

@mitasovr

@mitasovr mitasovr commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Problem

Two things in the Members × metrics widget:

  1. fix(team-view): member popup links to the IC page; Expand details opens the full-metric sheet #198 merged with its first iteration — the grid growing a column for every metric in the roster's data. That direction was rejected in review: the table should keep its curated 7 columns, and the full metric set belongs to the details sheet (fix(team-view): show a member's full metric set in the details sheet #193). The reworked branch was force-pushed, but the merge picked up the pre-rework content.
  2. In the member popup, "Open in IC view" opened the details sheet instead of navigating anywhere, and "Expand details" toggled a redundant inline bullet strip under the row.

Change

  • Revert fix(team-view): member popup links to the IC page; Expand details opens the full-metric sheet #198 (1a44492): the grid is back to the curated 7 columns.
  • "Open in IC view" is now a router <Link> to the member's personal IC page (/ic/$person/personal), rendered through the Button render prop — real navigation, middle-click and copy-link work.
  • "Expand details" opens the details sheet (full metric set: grid cells + remaining legacy bullets + unified git/ai entries).
  • The inline ExpandedBullets strip, its expansion state, and the unused MemberRow plumbing are removed.

Verification

Verified in the browser against the mock stack: the grid renders 7 columns; the popup's "Open in IC view" navigates SPA-style to the member's personal dashboard; "Expand details" opens the sheet with the member's full metric set (60 rows on the mock roster).

Typecheck, ESLint, and the full vitest suite pass; the component test asserts the link href and opens the sheet through "Expand details".

Related to constructorfabric/insight#1729

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Updated the members heatmap to present a consistent set of team and bullet metrics.
    • Member detail views now include additional available metrics without duplicate entries.
    • Added clearer navigation from member details to the IC view, with an option to expand full details.
  • Bug Fixes

    • Improved metric display and sorting consistency across the heatmap and member detail views.

Roman Mitasov and others added 2 commits July 15, 2026 13:18
…ll metric set (#198)"

This reverts commit 1a44492.

Signed-off-by: Roman Mitasov <roman.mitasov@constructor.tech>
…from Expand details

In the Members × metrics popup, "Open in IC view" opened the details
sheet while "Expand details" toggled an inline bullet strip under the
row. Rework per review of #198: "Open in IC view" is now a router link
to the member's personal IC page, and "Expand details" opens the
details sheet (which already shows the full metric set after #193).
The inline ExpandedBullets strip and its expansion state go away.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Roman Mitasov <roman.mitasov@constructor.tech>
@mitasovr
mitasovr requested a review from a team as a code owner July 15, 2026 10:22
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The members heatmap now renders a fixed team-and-bullet grid, simplifies metric formatting, builds detail-sheet rows from grid cells, and replaces expanded bullet rows with details-sheet and IC-view actions. Tests mock router links and verify the new navigation flow.

Changes

Members heatmap

Layer / File(s) Summary
Fixed heatmap grid
src/components/widgets/v2/members-heatmap/index.tsx, src/components/widgets/v2/members-heatmap/index.test.tsx
Grid columns, row construction, sorting, sizing, and headers now use the fixed COLUMNS set; the prior dynamic metric-column test was removed.
Sheet and cell formatting
src/components/widgets/v2/members-heatmap/index.tsx
Cells and detail-sheet rows use simplified numeric/unit formatting, with grid-based key and label deduplication.
Member actions and navigation
src/components/widgets/v2/members-heatmap/index.tsx, src/components/widgets/v2/members-heatmap/index.test.tsx
Member rows open the details sheet through “Expand details” and provide an “Open in IC view” link; expanded bullet rendering and related props were removed, with link href coverage added.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

Suggested reviewers: aleksdotbar, ktursunov

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the main changes: reverting heatmap column growth and making the member popup link to the IC page.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/members-heatmap-popup-links

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed: private package registry requires authentication. Disable ESLint in CodeRabbit settings or use public packages.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mitasovr
mitasovr merged commit 726b1cc into main Jul 15, 2026
4 of 5 checks passed

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/components/widgets/v2/members-heatmap/index.tsx (1)

293-295: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use previous bullet data without requiring prevMember.

Bullet columns only need prevBullets, but this guard discards them unless previousMembers also contains the person, silently disabling bullet WoW indicators.

Proposed fix
-        const previous = prevMember
-          ? valueForColumn(col, prevMember, prevBullets)
-          : null;
+        const previous =
+          col.source === "team_row"
+            ? prevMember
+              ? valueForColumn(col, prevMember, prevBullets)
+              : null
+            : valueForColumn(col, m, prevBullets);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/widgets/v2/members-heatmap/index.tsx` around lines 293 - 295,
Update the previous-value calculation around valueForColumn so bullet columns
use prevBullets whenever previous bullet data exists, without requiring
prevMember to be truthy. Preserve the existing member-based lookup for
non-bullet columns and ensure missing data still produces null.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/components/widgets/v2/members-heatmap/index.tsx`:
- Around line 427-432: Update the cell display formatting in the row.cells
mapping and the corresponding paths at the additional locations to use the
shared unit-suffix formatter for both values and medians. Preserve null handling
and rounding while ensuring multi-character units are separated from the numeric
value consistently with the existing bullet-sheet formatting.

---

Outside diff comments:
In `@src/components/widgets/v2/members-heatmap/index.tsx`:
- Around line 293-295: Update the previous-value calculation around
valueForColumn so bullet columns use prevBullets whenever previous bullet data
exists, without requiring prevMember to be truthy. Preserve the existing
member-based lookup for non-bullet columns and ensure missing data still
produces null.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 661991c4-9085-4df6-a8ec-c27698c42f85

📥 Commits

Reviewing files that changed from the base of the PR and between 6f55e6a and c263d07.

📒 Files selected for processing (2)
  • src/components/widgets/v2/members-heatmap/index.test.tsx
  • src/components/widgets/v2/members-heatmap/index.tsx

Comment on lines 427 to +432
const fromCells: MemberDetailRow[] = row.cells.map((c) => ({
key: c.col.key,
label: c.col.label,
display:
c.value == null
? "—"
: c.format
? formatMetricValue(c.value, c.format, c.unit || null)
: `${Math.round(c.value)}${unitSuffix(c.unit)}`,
display: c.value == null ? "—" : `${Math.round(c.value)}${c.unit ?? ""}`,
medianDisplay:
c.median == null
? null
: c.format
? formatMetricValue(c.median, c.format, c.unit || null)
: `${Math.round(c.median)}${unitSuffix(c.unit)}`,
c.median != null ? `${Math.round(c.median)}${c.unit ?? ""}` : null,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Preserve spacing for multi-character units.

Direct interpolation renders arbitrary bullet units as strings such as 12hours. Reuse a shared unit-suffix formatter for cell values and medians; the remaining bullet-sheet path already inserts this separator.

Proposed approach
+function unitSuffix(unit?: string): string {
+  return unit ? (unit.length === 1 ? unit : ` ${unit}`) : "";
+}

-`${Math.round(c.value)}${c.unit ?? ""}`
+`${Math.round(c.value)}${unitSuffix(c.unit)}`

-`${Math.round(value)}${unit ?? ""}`
+`${Math.round(value)}${unitSuffix(unit)}`

Also applies to: 576-579, 612-614

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/widgets/v2/members-heatmap/index.tsx` around lines 427 - 432,
Update the cell display formatting in the row.cells mapping and the
corresponding paths at the additional locations to use the shared unit-suffix
formatter for both values and medians. Preserve null handling and rounding while
ensuring multi-character units are separated from the numeric value consistently
with the existing bullet-sheet formatting.

mitasovr added a commit that referenced this pull request Jul 15, 2026
…201)

The diff-coverage gate on #200 flagged the column-sort branch of
sortedRows (COLUMNS.findIndex lookup) — the revert re-introduced those
lines and no test clicked a column header. Add a test that sorts by a
higher-is-better column, checks the row order flips, and exercises the
lower-is-better path with missing values.

Signed-off-by: Roman Mitasov <roman.mitasov@constructor.tech>
Co-authored-by: Roman Mitasov <roman.mitasov@constructor.tech>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.

2 participants