Skip to content

Dev#21

Merged
TheKentuckian merged 36 commits intomasterfrom
dev
Apr 9, 2026
Merged

Dev#21
TheKentuckian merged 36 commits intomasterfrom
dev

Conversation

@TheKentuckian
Copy link
Copy Markdown
Contributor

No description provided.

TheKentuckian and others added 30 commits February 5, 2026 11:34
Lot, Location, and TPM
1) Reset pagination when changing DnD filters
2) Fix smartphone counter bug in assigned devices column in device request component, and device request index
Fix flawed X of Y filtered subtotal calc in footer
Query buildInfo from the GraphQL API and display both API version/commit
and web version/commit in the footer. The build-pre.js script now captures
the git commit hash at build time and includes it in version.ts.

https://claude.ai/code/session_01TrGEAzBHfdgSmoWzsiaP2t
…-info-wubCa

Add API version display and git commit tracking
Replaces SSH-based Docker builds with a GitHub Actions workflow that
builds and pushes the image to the public GitHub Container Registry
(ghcr.io/communitytechaid/techaid-dashboard) using GITHUB_TOKEN — no
additional secrets required.

Also adds scripts/deploy-from-ghcr.sh, a cron-friendly script for the
dokku server that pulls the latest image every run and redeploys the
'app' application only when a new digest is detected.

https://claude.ai/code/session_012ZBSrvvea5Z23VxTn3N7bT
…-build-iE9TP

Add GitHub Actions Docker publish workflow and GHCR deploy script
- Add `time` field to buildInfo GraphQL query
- Show build timestamps for both API and Web in footer
- Handle query errors gracefully with 'unavailable' fallback
- Log errors to console for debugging blank API version

Footer now shows: API: 0.0.2-SNAPSHOT (9dee8b0) 2026-04-09 / Web: 1.0.2 (e50b71f) 26.04.09-1133

https://claude.ai/code/session_01TrGEAzBHfdgSmoWzsiaP2t
…-info-wubCa

Fix API version display and restore build timestamps
Passing :latest tag always gave dokku the same string, causing it to
report "No changes detected" and skip the rebuild. Passing the full
digest (ghcr.io/...@sha256:...) gives dokku a unique value on each
new image, so it correctly triggers the deployment.

https://claude.ai/code/session_012ZBSrvvea5Z23VxTn3N7bT
The Apollo client's auth context link blocks/fails the buildInfo query
because it tries to acquire a bearer token before every request. Since
buildInfo is a public endpoint that requires no auth, bypass Apollo and
use HttpClient directly to POST the GraphQL query.

https://claude.ai/code/session_01TrGEAzBHfdgSmoWzsiaP2t
…-info-wubCa

Use HttpClient instead of Apollo for buildInfo query
Angular's HttpClient goes through registered HTTP interceptors which
may interfere with the unauthenticated buildInfo request. Switch to
native fetch() which bypasses all Angular interceptors entirely.

https://claude.ai/code/session_01TrGEAzBHfdgSmoWzsiaP2t
…-info-wubCa

Use native fetch for buildInfo to bypass Angular interceptors
…-build-iE9TP

Fix deploy script to pass image digest to dokku git:from-image
Native fetch() resolves outside Angular's zone, so property updates
don't trigger change detection. Wrap updates in NgZone.run() so
Angular re-renders the template. Added console.log diagnostics to
help debug the endpoint URL and response shape.

https://claude.ai/code/session_01TrGEAzBHfdgSmoWzsiaP2t
…-info-wubCa

Fix change detection for fetch-based buildInfo and add diagnostics
The production and UAT environment configs had hardcoded API URLs
(e.g. https://api.communitytechaid.org.uk/graphql), which bypasses
the nginx proxy. This caused the UAT frontend to hit the production
API, where buildInfo doesn't exist yet.

Change both to use /api/graphql so requests go through the nginx
proxy, which routes to the correct backend via the API_HOST env var.
The dev config already used this path.

https://claude.ai/code/session_01TrGEAzBHfdgSmoWzsiaP2t
TheKentuckian and others added 6 commits April 9, 2026 14:14
…-info-wubCa

Route GraphQL through nginx proxy instead of hardcoded URLs
Revert environment.prod.ts and environment.uat.ts back to their
original hardcoded GraphQL endpoints — these are needed for the
Apollo client's cross-origin requests.

For buildInfo specifically, read window.__env.apiHost (injected at
container startup from the API_HOST env var) to construct the
correct GraphQL endpoint at runtime. Falls back to the baked-in
graphql_endpoint if apiHost is not set.

https://claude.ai/code/session_01TrGEAzBHfdgSmoWzsiaP2t
This enables a single Docker image to be deployed to any environment
(UAT, production) with the GraphQL endpoint set at container startup.

How it works:
- 20-generate-env-js.sh injects GRAPHQL_ENDPOINT into window.__env
- ConfigService.update() merges window.__env.graphql_endpoint over
  the build-time default from environment.ts
- Both Apollo (graphql.module.ts) and buildInfo fetch read from
  ConfigService, so both pick up the runtime override automatically
- If GRAPHQL_ENDPOINT is not set, the build-time default is used

Deployment: set GRAPHQL_ENDPOINT env var on the container, e.g.:
  GRAPHQL_ENDPOINT=https://api-testing.communitytechaid.org.uk/graphql

Also removes the temporary window.__env.apiHost workaround and
diagnostic console.logs from the previous commits.

https://claude.ai/code/session_01TrGEAzBHfdgSmoWzsiaP2t
…-info-wubCa

Claude/add graphql build info wub ca
The full version string (API + Web) is now ~100 chars and distracting
for general users. Display 'Version Info' as the visible label with
the full version string in a tooltip on hover.

https://claude.ai/code/session_01TrGEAzBHfdgSmoWzsiaP2t
…-info-wubCa

Show version info on hover instead of inline text
@TheKentuckian TheKentuckian merged commit 6f06ce0 into master Apr 9, 2026
1 check 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.

2 participants