Skip to content

refactor: unified VI, removed compose layer, consolidated shared components#2706

Merged
sykp241095 merged 2 commits intomainfrom
refactor/unified-vi-and-cleanup
Mar 31, 2026
Merged

refactor: unified VI, removed compose layer, consolidated shared components#2706
sykp241095 merged 2 commits intomainfrom
refactor/unified-vi-and-cleanup

Conversation

@sykp241095
Copy link
Copy Markdown
Member

Summary

Major UI/VI unification across all analysis pages (repo, org, user, collection, compare).

  • 187 files changed, net -4500 lines (removed compose layer, duplicate code, unused components)
  • Unified sidebar, titles, tables, charts, spacing, colors across all pages
  • Removed charts/compose/org/ layer (17 chart wrappers) — org sections now directly use charts/analyze/org/
  • Extracted shared chart visualizations (map, word cloud, heatmap)
  • Added CollapsibleSidebar, StickyRepoHeader, ScrollspySectionWrapper anchors
  • Fixed hydration mismatch, tainted canvas export, ECharts chart type registration

Test plan

🤖 Generated with Claude Code

…onents

- Unified sidebar: CollapsibleSidebar across repo/org/user/collection/compare pages
- Unified title hierarchy: H1(28px) H2(22px) H3(18px) H4(14px) across all pages
- Unified ShowSQL: all placed in title row right side
- Unified table styles: RankTable pattern (No./Name/Value) for repo/org
- Unified chart grid lines: #2a2a2c dashed splitLine on all axes
- Unified dataZoom: slim 16px slider, no data shadow
- Unified sidebar nav: left border selected state, no background highlight
- Unified spacing: section pt-8/pb-8, title pb-4, chart title mb-3
- Unified right padding: 10% on all analysis/collection layouts
- Unified OG image constants: shared lib/og-image.ts
- Unified colors: removed yellow (#f7df83) from collection pages
- Unified breadcrumb: Home icon style on collection pages with Edit link

- Removed compose layer: deleted charts/compose/org/ (17 chart wrappers)
- Removed SectionTemplate: org/user sections use ScrollspySectionWrapper
- Removed duplicate code: utils/format.ts, charts-utils/ui/, Analyze/options/
- Removed duplicate API route: /gh/repos/[owner]/[repo]
- Removed unused components: MainSideGridTemplate, SplitTemplate, SubChart, ChartLinks

- Shared chart visualizations: map-chart.ts, word-cloud.tsx, time-heatmap.tsx
- Added StickyRepoHeader for repo analysis
- Added ScrollspySectionWrapper anchors for sidebar scroll tracking
- Added RadarChart/PieChart/TreemapChart to ECharts registry
- Fixed hydration mismatch in ShareButtons
- Fixed tainted canvas export error
- Replaced native select with tabs in developer activities
- Removed Organization/Developer type labels
- Removed breadcrumbs from analysis pages
- Removed "Last active at" from org header

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 31, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ossinsight-docs Ready Ready Preview, Comment Mar 31, 2026 3:43pm
ossinsight-web Ready Ready Preview, Comment Mar 31, 2026 3:43pm

Request Review

… cleanup

## Shared UI Components
- TabBar: replaces 3 inline tab implementations
- SectionHeading: replaces 25 inline heading elements
- MetricTable: replaces duplicate overview tables in repo/user pages
- LoadingSkeleton: consolidates 3 identical definitions
- useChartContainer: shared ResizeObserver hook for RepoChart/OrgChart
- createTimeSeriesOption: reduces 7 inline ECharts option builders
- PageSkeleton: shared loading.tsx skeletons

## Visual Consistency
- Removed ALL yellow accent colors (#ffe895/#f7df83/#fbe593) — primary is now white
- Unified border-radius: rounded-xl/2xl/3xl → rounded-md/sm across all components
- Unified hover colors: 31 yellow hover variants → hover:text-white
- Unified description text: 4 non-standard styles → text-[16px] text-[#7c7c7c]
- Unified dropdown/popover bg: #2f2f3a → #212122
- Unified input/select focus: yellow ring → subtle gray border
- Unified kbd styling: removed border, simplified
- Cleaned search dialog width (CSS class with !important)
- Removed card backgrounds from Repository Statistics section

## Performance
- Context values memoized (AnalyzeContext, AnalyzeChartContext, CollapsibleSidebar)
- Removed 6 remaining key={} props forcing chart remounts
- Sidebar animation: removed transition-[width] (layout thrash)
- SQLDialog lazy-loaded via dynamic import (~300 lines deferred)
- fetchCollections wrapped in React.cache for server dedup
- useTransition for tab switches and URL param changes
- TabBar onPrefetch hook for hover-based data prefetching
- staleTime 5min on RepoChart/OrgChart queries
- content-visibility: auto on ScrollspySectionWrapper
- will-change-transform on sticky elements
- requestAnimationFrame throttling on scroll handlers
- passive: true on all scroll listeners
- Font display: swap for Geist font
- Fixed layout shift: StickyRepoHeader → fixed positioning
- transition-all → specific properties (6 files)

## Next.js Best Practices
- React 18 → 19, @types/react 18 → 19
- error.tsx on all 14 routes
- loading.tsx with proper skeletons on all routes
- generateStaticParams for popular repo/org pages
- Removed contradictory force-dynamic + revalidate on trending/languages
- next/image optimization enabled (removed unoptimized: true)
- router.push → Link component (3 places)

## Engineering Quality
- Removed 9 console.log/warn from client code
- Cleaned 18 TODO/FIXME comments
- VisualizerModule type replaces 14 `any` in chart system
- Deduplicated chart color palettes
- Unified percentage formatting to number2percent
- CSS variables configured for design tokens
- Fixed duplicate splitLine properties in 7 chart files
- Removed unused @ts-expect-error directives

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sykp241095 sykp241095 merged commit 072c8a3 into main Mar 31, 2026
1 of 4 checks passed
@sykp241095 sykp241095 deleted the refactor/unified-vi-and-cleanup branch March 31, 2026 15:42
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.

1 participant