Refactor code structure for improved readability and maintainability
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
# Graph Report - nobat724_front (2026-07-09)
|
||||
# Graph Report - nobat724_front (2026-07-10)
|
||||
|
||||
## Corpus Check
|
||||
- 595 files · ~537,275 words
|
||||
- 596 files · ~537,596 words
|
||||
- Verdict: corpus is large enough that graph structure adds value.
|
||||
|
||||
## Summary
|
||||
- 2051 nodes · 2034 edges · 374 communities (344 shown, 30 thin omitted)
|
||||
- 2055 nodes · 2037 edges · 374 communities (344 shown, 30 thin omitted)
|
||||
- Extraction: 95% EXTRACTED · 5% INFERRED · 0% AMBIGUOUS · INFERRED: 99 edges (avg confidence: 0.8)
|
||||
- Token cost: 0 input · 0 output
|
||||
|
||||
## Graph Freshness
|
||||
- Built from commit: `a56b7e8d`
|
||||
- Built from commit: `ab2ab0de`
|
||||
- Run `git rev-parse HEAD` and compare to check if the graph is stale.
|
||||
- Run `graphify update .` after code changes (no API cost).
|
||||
|
||||
@@ -163,6 +163,8 @@
|
||||
10. `Architecture Overview` - 10 edges
|
||||
|
||||
## Surprising Connections (you probably didn't know these)
|
||||
- `Dashboard()` --calls--> `safeJsonParse()` [INFERRED]
|
||||
app/dashboard/page.js → lib/sanitize.js
|
||||
- `AboutUsPage()` --calls--> `getStateInfo()` [INFERRED]
|
||||
components/aboutUs/index.js → lib/getStateInfo.js
|
||||
- `ContactUsPage()` --calls--> `getStateInfo()` [INFERRED]
|
||||
@@ -171,8 +173,6 @@
|
||||
components/home/search/index.js → lib/getStateInfo.js
|
||||
- `StLayout()` --calls--> `getStateInfo()` [INFERRED]
|
||||
components/layout/StLayout.js → lib/getStateInfo.js
|
||||
- `generateMetadata()` --calls--> `getStateInfo()` [INFERRED]
|
||||
app/about-us/page.js → lib/getStateInfo.js
|
||||
|
||||
## Import Cycles
|
||||
- None detected.
|
||||
@@ -184,12 +184,12 @@ Cohesion: 0.05
|
||||
Nodes (27): BgGray(), ButtonMenu(), Col(), ModalLogout(), Footer(), head, LogoNamad(), Namads (+19 more)
|
||||
|
||||
### Community 1 - "Community 1"
|
||||
Cohesion: 0.24
|
||||
Nodes (8): Head(), convertTimestampToJalali(), convertTimestampToTime(), ButtonData(), DetailLg(), DetailSm(), Head(), Card()
|
||||
Cohesion: 0.36
|
||||
Nodes (5): convertTimestampToTime(), ButtonData(), DetailLg(), DetailSm(), Head()
|
||||
|
||||
### Community 2 - "Community 2"
|
||||
Cohesion: 0.04
|
||||
Nodes (45): dependencies, aos, axios, @casl/ability, @casl/react, date-fns, dayjs, @emotion/cache (+37 more)
|
||||
Nodes (46): dependencies, altcha, aos, axios, @casl/ability, @casl/react, date-fns, dayjs (+38 more)
|
||||
|
||||
### Community 3 - "Community 3"
|
||||
Cohesion: 0.24
|
||||
@@ -204,8 +204,8 @@ Cohesion: 0.08
|
||||
Nodes (18): AppointmentList(), ItemAppointment(), AboutDcotor(), DetailDoctor(), Link(), listLink, List(), VAZIR_WEIGHTS (+10 more)
|
||||
|
||||
### Community 6 - "Community 6"
|
||||
Cohesion: 0.06
|
||||
Nodes (17): Dashboard(), metadata, defineAbilitiesFor(), getUser(), formatToman(), rialToToman(), buildPatientUser(), safeJsonParse() (+9 more)
|
||||
Cohesion: 0.07
|
||||
Nodes (16): Dashboard(), metadata, defineAbilitiesFor(), getUser(), formatToman(), rialToToman(), buildPatientUser(), getServerAccessToken() (+8 more)
|
||||
|
||||
### Community 8 - "Community 8"
|
||||
Cohesion: 0.13
|
||||
@@ -240,8 +240,8 @@ Cohesion: 0.14
|
||||
Nodes (10): Chart(), ProgressAll(), fallbackLabels, ProgressDetail(), Form(), Content(), Rates(), numberToArStyle() (+2 more)
|
||||
|
||||
### Community 16 - "Community 16"
|
||||
Cohesion: 0.25
|
||||
Nodes (6): Head(), AboutUsPage(), ourServices, Services(), TickOrangeA(), UnderlineLG()
|
||||
Cohesion: 0.14
|
||||
Nodes (10): Head(), AboutUsPage(), ourServices, Services(), SearchBar(), TickOrangeA(), UnderlineLG(), ButtonFilter() (+2 more)
|
||||
|
||||
### Community 17 - "Community 17"
|
||||
Cohesion: 0.11
|
||||
@@ -356,8 +356,8 @@ Cohesion: 0.14
|
||||
Nodes (13): `hours/List.js`, آبجکت اسلات (از `adaptSlots` / API), تأیید و سختسازی غیرفعالبودن اسلاتهای گذشته در صفحهی نوبت, زمینه, فایلهای مرتبط, مشکل / هدف, نکات مهم, وضعیت فعلی (کد واقعی) (+5 more)
|
||||
|
||||
### Community 45 - "Community 45"
|
||||
Cohesion: 0.25
|
||||
Nodes (12): generateMetadata(), generateMetadata(), RootLayout(), imageUrl(), normalizeBlog(), getRequestOrigin(), safeJsonLd(), Blog() (+4 more)
|
||||
Cohesion: 0.23
|
||||
Nodes (11): generateMetadata(), generateMetadata(), imageUrl(), normalizeBlog(), safeJsonLd(), safeJsonParse(), Blog(), Doctor() (+3 more)
|
||||
|
||||
### Community 46 - "Community 46"
|
||||
Cohesion: 0.22
|
||||
@@ -464,8 +464,8 @@ Cohesion: 0.22
|
||||
Nodes (7): degree, Form(), gender, degree, Form(), gender, filterList()
|
||||
|
||||
### Community 72 - "Community 72"
|
||||
Cohesion: 0.52
|
||||
Nodes (6): generateMetadata(), buildCanonicalPath(), buildCanonicalUrl(), buildMainCanonicalUrl(), getCanonicalUrl(), normalizeHost()
|
||||
Cohesion: 0.39
|
||||
Nodes (8): generateMetadata(), RootLayout(), buildCanonicalPath(), buildCanonicalUrl(), buildMainCanonicalUrl(), getCanonicalUrl(), getRequestOrigin(), normalizeHost()
|
||||
|
||||
### Community 73 - "Community 73"
|
||||
Cohesion: 0.32
|
||||
@@ -497,11 +497,7 @@ Nodes (11): رفع خطای `TypeError: fetch failed` در sitemap هنگام د
|
||||
|
||||
### Community 83 - "Community 83"
|
||||
Cohesion: 0.24
|
||||
Nodes (6): STATUS_LABELS, Head(), listTab, Turns(), List(), STATUS_LABELS
|
||||
|
||||
### Community 85 - "Community 85"
|
||||
Cohesion: 0.36
|
||||
Nodes (4): SearchBar(), ButtonFilter(), Fields(), RedirectLink()
|
||||
Nodes (7): Card(), STATUS_LABELS, Head(), listTab, Turns(), List(), STATUS_LABELS
|
||||
|
||||
### Community 86 - "Community 86"
|
||||
Cohesion: 0.40
|
||||
@@ -511,6 +507,10 @@ Nodes (5): Doctors(), FILTER_KEYS, generateMetadata(), listingRobots(), buildDoc
|
||||
Cohesion: 0.33
|
||||
Nodes (6): 1. افزودن صفحه جدید, 2. افزودن API Endpoint جدید, 3. افزودن کامپوننت جدید, 4. کار با تاریخ شمسی, 5. استفاده از Context, 📝 نکات توسعه
|
||||
|
||||
### Community 89 - "Community 89"
|
||||
Cohesion: 0.28
|
||||
Nodes (4): Head(), convertTimestampToJalali(), RelatedContent(), Item()
|
||||
|
||||
### Community 90 - "Community 90"
|
||||
Cohesion: 0.50
|
||||
Nodes (4): buildDays(), InlineJalaliMonth(), MONTHS, WEEKDAYS
|
||||
@@ -596,24 +596,24 @@ Cohesion: 0.33
|
||||
Nodes (5): engines, node, name, private, version
|
||||
|
||||
## Knowledge Gaps
|
||||
- **697 isolated node(s):** `metadata`, `FILTER_KEYS`, `fallbackLabels`, `MaterialUISwitch`, `fixedIconData` (+692 more)
|
||||
- **699 isolated node(s):** `metadata`, `FILTER_KEYS`, `fallbackLabels`, `MaterialUISwitch`, `fixedIconData` (+694 more)
|
||||
These have ≤1 connection - possible missing edges or undocumented components.
|
||||
- **30 thin communities (<3 nodes) omitted from report** — run `graphify query` to explore isolated nodes.
|
||||
|
||||
## Suggested Questions
|
||||
_Questions this graph is uniquely positioned to answer:_
|
||||
|
||||
- **Why does `getStateInfo()` connect `Community 29` to `Community 0`, `Community 67`, `Community 70`, `Community 6`, `Community 72`, `Community 365`, `Community 45`, `Community 14`, `Community 16`, `Community 51`, `Community 85`, `Community 86`?**
|
||||
_High betweenness centrality (0.031) - this node is a cross-community bridge._
|
||||
- **Why does `getStateInfo()` connect `Community 29` to `Community 0`, `Community 67`, `Community 70`, `Community 6`, `Community 72`, `Community 365`, `Community 45`, `Community 14`, `Community 16`, `Community 51`, `Community 86`?**
|
||||
_High betweenness centrality (0.032) - this node is a cross-community bridge._
|
||||
- **Why does `imageUrl()` connect `Community 45` to `Community 0`, `Community 99`, `Community 4`, `Community 7`, `Community 365`, `Community 81`, `Community 55`, `Community 56`, `Community 89`?**
|
||||
_High betweenness centrality (0.025) - this node is a cross-community bridge._
|
||||
- **Why does `isRootCity()` connect `Community 51` to `Community 3`, `Community 29`?**
|
||||
_High betweenness centrality (0.015) - this node is a cross-community bridge._
|
||||
_High betweenness centrality (0.016) - this node is a cross-community bridge._
|
||||
- **Are the 22 inferred relationships involving `getStateInfo()` (e.g. with `generateMetadata()` and `AboutUsPage()`) actually correct?**
|
||||
_`getStateInfo()` has 22 INFERRED edges - model-reasoned connections that need verification._
|
||||
- **Are the 14 inferred relationships involving `imageUrl()` (e.g. with `generateMetadata()` and `generateMetadata()`) actually correct?**
|
||||
_`imageUrl()` has 14 INFERRED edges - model-reasoned connections that need verification._
|
||||
- **What connects `metadata`, `FILTER_KEYS`, `fallbackLabels` to the rest of the system?**
|
||||
_697 weakly-connected nodes found - possible documentation gaps or missing edges._
|
||||
_699 weakly-connected nodes found - possible documentation gaps or missing edges._
|
||||
- **Should `Community 0` be split into smaller, more focused modules?**
|
||||
_Cohesion score 0.05263157894736842 - nodes in this community are weakly interconnected._
|
||||
Reference in New Issue
Block a user