Conversation
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying provider-intelligence-hub with
|
| Latest commit: |
7a5fedc
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ebca2ca3.provider-intelligence-hub.pages.dev |
| Branch Preview URL: | https://network-expansion-brief.provider-intelligence-hub.pages.dev |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7a5fedc05a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const { data: procurementData = [], isLoading: procurementLoading } = useQuery<ProcurementRecord[]>({ | ||
| queryKey: ["/api/procurement"], | ||
| queryFn: () => api<ProcurementRecord[]>("/api/procurement"), | ||
| }); |
There was a problem hiding this comment.
Prevent failed fetches from becoming zero-valued briefs
When /api/procurement returns a non-2xx response, React Query leaves procurementData at the [] default, but the query error is never inspected. The page therefore presents a legitimate-looking brief with zero activations, zero markets, and zero pipeline records while Copy Summary and Print / Save PDF remain enabled, allowing a transient API failure to produce and share an incorrect report; render an error state and disable exporting until the procurement query succeeds.
Useful? React with 👍 / 👎.
|
|
||
| return ( | ||
| <div className="space-y-6 pb-12 print:space-y-4"> | ||
| <style>{`@media print { aside, .print-hide { display:none !important; } main { overflow:visible !important; } body { background:#080a0c !important; -webkit-print-color-adjust:exact; print-color-adjust:exact; } .print-card { break-inside:avoid; } }`}</style> |
There was a problem hiding this comment.
Let the print layout escape the viewport shell
When the brief is taller than one viewport, this print rule only changes main, while Layout still wraps it in h-screen overflow-hidden and places the content inside an overflow-auto container. Those fixed-height overflow ancestors clip or constrain the printable content, so Print / Save PDF can omit cards after the first page; the print CSS needs to reset the height and overflow on the layout shell and scrolling content wrapper as well.
Useful? React with 👍 / 👎.
| activated.forEach((record) => { | ||
| const key = locationLabel(record); | ||
| counts.set(key, (counts.get(key) || 0) + 1); |
There was a problem hiding this comment.
Exclude unknown locations from the market total
For activated records with no city, state, or country—fields that the procurement API permits to be null—locationLabel returns "Location not set", and this loop counts that fallback as a real market. Consequently one or many unlocated activations make the headline and copied summary claim that a market was added; track those records separately or omit the fallback key from the market count.
Useful? React with 👍 / 👎.
Adds a presentation-ready expansion view built directly from activated procurement records.
No fake metrics or sample expansion data are introduced.