Commit 072c8a3
refactor: unified VI, shared components, React 19, performance (#2706)
* refactor: unified VI, removed compose layer, consolidated shared components
- 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>
* refactor: UI abstractions, performance, React 19 upgrade, engineering 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>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 7756bc6 commit 072c8a3
295 files changed
Lines changed: 4084 additions & 8638 deletions
File tree
- .claude
- apps/web
- app
- analyze-user/[login]
- _charts
- _hooks
- _sections
- analyze
- (org)/[owner]
- _sections
- participant
- productivity
- (repo)/[owner]/[repo]
- _sections
- collections
- [slug]
- trends
- _components
- compare/[owner1]/[repo1]/[owner2]/[repo2]
- explore
- gh/repos/[owner]/[repo]
- languages
- [language]
- llms-full.txt
- trending
- [tab]
- ai
- charts
- analyze
- org
- activity-action-top-repos
- activity-efficiency
- activity-map
- activity-open-to-close
- activity-open-to-first-response
- commits-time-distribution
- company
- engagement-scatter
- pull-requests-open-to-review
- recent-pr-review-stats
- recent-stats
- repo
- activity-trends
- commits-time-distribution
- company
- recent-collaborative-productivity-metrics
- stars-history
- stars-map
- user
- contribution-time-distribution
- contribution-trends
- basic/bubbles-chart
- collection-annually-ranking
- compose/org
- active-contributors
- activity-active-ranking
- activity-company
- activity-growth-total
- activity-map
- activity-new-ranking
- activity-open-to-close
- activity-open-to-first-response
- code-changes-top-repositories
- engagement-scatter
- overview-stars
- overview-stats
- participants-growth
- participants-roles-ratio
- productivity-ratio
- pull-requests-open-to-review
- stars-top-repos
- components
- Analyze
- Header
- Section
- OrgChart
- RepoChart
- gridTemplates
- Table
- hooks
- options
- utils
- Scrollspy
- ai-elements
- ui
- components
- AnalyzeSelector
- HeaderAnalyzeSelector
- Button
- GHAvatar
- GHRepoSelector
- RemoteSelector
- Selector
- lib
- charts-core
- datasource
- renderer
- utils
- charts-types
- charts-utils
- options
- utils
- ui
- data-service/executor
- utils
- configs
- collections
- queries/collection-pull-requests-history
- packages/site-shell/src
- header-search
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
Lines changed: 59 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
15 | 22 | | |
16 | 23 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
26 | 29 | | |
27 | 30 | | |
28 | | - | |
29 | | - | |
| 31 | + | |
| 32 | + | |
30 | 33 | | |
31 | 34 | | |
32 | | - | |
33 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
34 | 68 | | |
35 | 69 | | |
36 | 70 | | |
37 | | - | |
38 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
39 | 78 | | |
40 | 79 | | |
41 | 80 | | |
42 | 81 | | |
43 | 82 | | |
44 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
45 | 88 | | |
46 | 89 | | |
47 | 90 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| |||
101 | 103 | | |
102 | 104 | | |
103 | 105 | | |
| 106 | + | |
| 107 | + | |
104 | 108 | | |
105 | 109 | | |
106 | 110 | | |
| |||
Lines changed: 15 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
23 | | - | |
24 | | - | |
25 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
26 | 28 | | |
27 | | - | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
35 | | - | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| |||
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
53 | | - | |
54 | | - | |
| 55 | + | |
| 56 | + | |
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
| |||
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
| 70 | + | |
68 | 71 | | |
69 | 72 | | |
70 | 73 | | |
71 | 74 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
85 | 78 | | |
86 | | - | |
| 79 | + | |
87 | 80 | | |
88 | 81 | | |
89 | 82 | | |
Lines changed: 12 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | | - | |
26 | | - | |
27 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | | - | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | | - | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
82 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
83 | 86 | | |
84 | 87 | | |
85 | 88 | | |
| |||
93 | 96 | | |
94 | 97 | | |
95 | 98 | | |
96 | | - | |
| 99 | + | |
97 | 100 | | |
98 | 101 | | |
99 | 102 | | |
| |||
110 | 113 | | |
111 | 114 | | |
112 | 115 | | |
113 | | - | |
| 116 | + | |
114 | 117 | | |
115 | 118 | | |
116 | 119 | | |
| |||
Lines changed: 14 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
15 | | - | |
16 | | - | |
17 | | - | |
| 17 | + | |
| 18 | + | |
18 | 19 | | |
19 | | - | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
33 | 30 | | |
34 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
35 | 34 | | |
0 commit comments