Skip to content

Plugin migration#91

Merged
saurabhsharma2u merged 20 commits into
mainfrom
plugin-migration
Mar 4, 2026
Merged

Plugin migration#91
saurabhsharma2u merged 20 commits into
mainfrom
plugin-migration

Conversation

@saurabhsharma2u

Copy link
Copy Markdown
Contributor

No description provided.

…istence

- ScopeManager: init after rootOrigin resolved; allow root-relative paths
- crawler: reconstruct absolute URL for robots check and fetchPage call
- PageRank: fix canonical filter to compare pathname vs path (not abs URL)
- metricsRunner: persist duplicate_clusters and content_clusters to DB
- metricsRunner: add missing is_cluster_primary field
- clustering: fix findSharedPathPrefix for root-relative paths
- usecases: default all analysis flags (heading, health, clustering, pagerank, hits, orphans) to true
- usecases: wire EngineContext emit so --log-level debug/verbose shows per-page logs
- crawl.ts: add emit to PluginContext so it flows through to crawler
- analyze.ts: integrate HealthService, persist health_score to snapshots"
…th param

The web UI sends paths like '/stats' to /api/page, but PageAnalysisUseCase
needs an absolute URL (https://domain/stats) to resolve/fetch the page.

- Detect root-relative paths and prepend site domain before calling use case
- Continue using the raw path for DB normalized_url lookups (stored as paths)
When given a sub-page URL like 'https://example.com/stats', analyzeSite
was resolving the full URL (including pathname) and using it as rootOrigin.
This caused UrlUtil.toPath to return '/' instead of '/stats', so the page
was never matched in analyzePages and result.pages was always empty (→ 404).

Fix: extract origin (scheme+host) and pathname separately. Resolve only the
origin, use pathname as normalizedPath directly.
HealthService was being called in analyzeSite (page --live command) but
was missing entirely from metricsRunner.ts (the crawl command path).
This resulted in a health_score of NULL for all crawls.

- Integrated HealthService into runPostCrawlMetrics
- Persist health_score to snapshots table
- Passed rootOrigin from usecases.ts so health checks like canonical conflicts compute correctly
- Pass heading_data through the /api/page SQLite query
- Parse the heading_data JSON in the API response
- Map the structural heading tree locally in the SinglePage components
- Display indentations and heading levels with structural issues if present
…ize URLs on /page/* API routes

- Compute node.headingScore before siteScores mapping
- Sync graph-level scores like headingScore back to PageAnalysis models.
- Re-run scorePageSeo with the structural node.headingScore instead of just H1 tag data
- Automatically reconstruct full absolute URLs on the /api/page/cluster, /api/page/inlinks, and /api/page/outlinks endpoint by detecting relative URI variants
…s\nfix(analyze): capture detectDuplicates result array down in post-metrics runner
…ata for a page\nfeat(ui): add Performance & Core Web Vitals tab displaying PageSpeed Insights data
- Fixed URL normalization in `getPageIdByUrl` for absolute paths
- Expose raw HTML property to plugins via `analyze.ts` for proper Signals detection
- Increased PageSpeedService API timeout to 60s
- Handled empty runtimeError outputs from PageSpeed API
- Added strict TypeScript row parsing for SQLite JSON columns
@saurabhsharma2u
saurabhsharma2u merged commit 91ee965 into main Mar 4, 2026
1 of 7 checks passed
@saurabhsharma2u
saurabhsharma2u deleted the plugin-migration branch March 4, 2026 17: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.

1 participant