feat(webapp): simplify file analysis headings (#38)

<!-- greptile_comment -->

<h3>Greptile Summary</h3>

This PR simplifies the file analysis page by consolidating per-chart headings into a shared "Source / Destination" column header, removing debug `console.log` calls, stripping redundant metadata paragraphs from the chart components, and replacing the old `reloadStructure`/`reloadSpectrum` stubs (which re-ran the full page load) with focused `loadStructureData`/`loadSpectrumData` async functions that only refetch the single affected dataset. The server-side changes also harden null/empty-array handling in the structure and spectrum endpoints.

Key changes:
- **UI**: Chart component titles (Chart.js `plugins.title`) and inline metadata rows removed; a single `Source / Destination` header row now sits above all three analysis grids in `+page.svelte`.
- **Retry logic**: `reloadStructure` and `reloadSpectrum` now call dedicated async functions instead of triggering a full `loadSummary`, which avoids unnecessarily re-fetching all router data and re-running singularity loads on every retry.
- **Server robustness**: `structure/+server.ts` and `spectrum/+server.ts` now correctly declare `string | null` column types and return HTTP 404 (instead of empty data) when a column is `null` or the parsed array is empty; the same guard was added to `details/+server.ts`.
- **Cleanup**: Debug `console.log` statements removed from `SpectrumChart`, `StructureFunctionChart`, and the singularities load path.

**UX issues:** The shared Source/Destination header grid breaks on viewports narrower than `lg`, and the retry path for structure/spectrum lacks loading indicators that singularities already provides.

<h3>Confidence Score: 4/5</h3>

- The logic changes are well-scoped and correct — null-safety fixes and dedicated refetch functions all improve correctness. Minor UX issues remain on small-screen layouts and retry flows.
- The backend changes (structure/spectrum/details servers) are solid — they correctly handle empty arrays and nulls by returning 404. The refetch functions (`loadStructureData`, `loadSpectrumData`) are correctly implemented. The two UX concerns are legitimate but non-critical: (1) the shared header grid misaligns on mobile due to stacking in single-column mode, and (2) structure/spectrum retries lack loading indicators, creating silent UX gaps during in-flight requests. Neither causes data loss or breaks functionality, but both degrade user experience. Safe to merge with these known issues.
- netflow-webapp/src/routes/api/netflow/files/[slug]/+page.svelte — requires UX adjustments for mobile header layout and loading state feedback on retry.

<sub>Last reviewed commit: f06c831</sub>

> Greptile also left **2 inline comments** on this PR.

<!-- /greptile_comment -->
2354c4f218oliver committed on 3/9/2026, 6:17:20 AM· committed by GitHubparents307afdd00155ea
7 files changedLine totals unavailable