Web: Add /resources page listing FHIR resource types with counts#107
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new feature module features/resources-ui/ that exposes a /resources page listing FHIR resource types declared by the server's CapabilityStatement together with per-type instance counts. The page is gated behind a new IGNIS_WEB_FEATURES_RESOURCES_UI flag (which also requires auth) and is wired up at the top level so non-admin authenticated users can access it.
Changes:
- New
resources-uifeature:config.server.tsflag,fhir-client.server.tsfor fetching CapabilityStatement + counts, and the/resourcesroute component. - Route registration in
app/routes.tsand.env.example/docs/server/web-configuration.mdupdates for the new flag. - New i18n strings (
en,nb) for the resources page title/subtitle, table headers, and capability error message.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Ignis.Web/app/routes.ts | Registers /resources under the locale prefix. |
| src/Ignis.Web/app/features/resources-ui/config.server.ts | Adds feature flag gated on auth + IGNIS_WEB_FEATURES_RESOURCES_UI. |
| src/Ignis.Web/app/features/resources-ui/fhir-client.server.ts | New helpers to fetch CapabilityStatement and per-type counts (duplicates admin URL resolution, per PR description). |
| src/Ignis.Web/app/features/resources-ui/routes/index.tsx | Route loader + UI for the resources table; redirects when disabled/unauthenticated. |
| src/Ignis.Web/app/i18n/messages/en.json | Adds English strings for the resources page. |
| src/Ignis.Web/app/i18n/messages/nb.json | Adds Norwegian Bokmål strings for the resources page. |
| src/Ignis.Web/.env.example | Documents the new feature flag. |
| docs/server/web-configuration.md | Documents the new feature flag and reflows the feature-flag table. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
87ca267 to
9729408
Compare
New features/resources-ui/ feature module behind IGNIS_WEB_FEATURES_RESOURCES_UI, gated by auth only — sits at /resources (top-level, not under /admin) so clinicians and other roles can use it. Loader fetches the CapabilityStatement and per-type counts (_summary=count) in parallel; counts that fail render as "—". URL resolution duplicates features/admin/fhir-api.server.ts; follow-up branch will lift the shared helpers into app/lib/fhir.server.ts.
9729408 to
9a6e8ec
Compare
kennethmyhra
approved these changes
May 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New features/resources-ui/ feature module behind IGNIS_WEB_FEATURES_RESOURCES_UI, gated by auth only — sits at /resources (top-level, not under /admin) so clinicians and other roles can use it. Loader fetches the CapabilityStatement and per-type counts (_summary=count) in parallel; counts that fail render as "—".
URL resolution duplicates features/admin/fhir-api.server.ts; follow-up branch will lift the shared helpers into app/lib/fhir.server.ts.