Skip to content

Fix GitHub preview repo selection and Three.js bar tooltip vertical alignment#39

Merged
amide-init merged 2 commits intomainfrom
copilot/fix-github-project-preview-issue
Apr 16, 2026
Merged

Fix GitHub preview repo selection and Three.js bar tooltip vertical alignment#39
amide-init merged 2 commits intomainfrom
copilot/fix-github-project-preview-issue

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 16, 2026

The preview modal was not using the intended repository subset for the GitHub project visualization, and the Three.js bar chart tooltip appeared detached from bar tops. This PR scopes preview graph input correctly and adjusts tooltip positioning to track rendered bar height.

  • Preview modal: use correct repo source for project graph

    • In PortfolioPreviewModal, stopped discarding the repos prop and now build preview graph data from the preview subset.
    • Added fallback to allRepos when preview subset is empty to preserve behavior for edge cases.
  • Three.js bar chart: correct tooltip Y anchor

    • In ThreeBarChart, updated tooltip anchor calculation so the tooltip sits near the visible bar top instead of floating too high.
    • Replaced inline offset literal with a named constant for readability and maintenance.
// PortfolioPreviewModal.tsx
const previewRepos = buildRepos(repos.length > 0 ? repos : allRepos)
...
<GitHubSection repos={previewRepos} />

// ThreeBarChart.tsx
const TOOLTIP_TOP_OFFSET = 0.1
...
pos3.y = bars[hoveredIdx].mesh.scale.y + TOOLTIP_TOP_OFFSET

Copilot AI and others added 2 commits April 16, 2026 19:41
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