Skip to content

Web: Add /resources page listing FHIR resource types with counts#107

Merged
kennethmyhra merged 1 commit into
incendilabs:mainfrom
losol:feature/web-resources-ui
May 29, 2026
Merged

Web: Add /resources page listing FHIR resource types with counts#107
kennethmyhra merged 1 commit into
incendilabs:mainfrom
losol:feature/web-resources-ui

Conversation

@losolio
Copy link
Copy Markdown
Contributor

@losolio losolio commented May 28, 2026

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.

Copilot AI review requested due to automatic review settings May 28, 2026 19:29
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-ui feature: config.server.ts flag, fhir-client.server.ts for fetching CapabilityStatement + counts, and the /resources route component.
  • Route registration in app/routes.ts and .env.example / docs/server/web-configuration.md updates 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.

Comment thread src/Ignis.Web/app/features/resources-ui/routes/index.tsx Outdated
Comment thread src/Ignis.Web/app/features/resources-ui/fhir-client.server.ts
@losolio losolio force-pushed the feature/web-resources-ui branch 2 times, most recently from 87ca267 to 9729408 Compare May 28, 2026 20:26
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.
@losolio losolio force-pushed the feature/web-resources-ui branch from 9729408 to 9a6e8ec Compare May 28, 2026 21:13
@losolio losolio requested a review from kennethmyhra May 29, 2026 19:34
@kennethmyhra kennethmyhra merged commit a7696cf into incendilabs:main May 29, 2026
5 checks passed
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.

3 participants