Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
248 commits
Select commit Hold shift + click to select a range
8c9c48e
feat: #309 - Add admin-only notice to login page
StubberG3 Aug 24, 2025
a596599
feat: #309 - add icon to login notice; add line break to return link
StubberG3 Aug 24, 2025
f81704f
feat: #309 - Remove extra padding above notice
StubberG3 Aug 24, 2025
757e712
feat: #309 - Remove forced login; update UI elements to reflect publi…
StubberG3 Aug 24, 2025
c9f3a31
feat: #309 - Add new logout page; restyle admin dropdown; restyle log…
StubberG3 Aug 24, 2025
2883471
feat: #309 - Separate public and admin api calls
StubberG3 Aug 25, 2025
8c4036e
feat: #309 - Disable JWT auth for newly public endpoints
StubberG3 Aug 26, 2025
3be42d3
feat: #309 - Make riskWithSources endpoint public
StubberG3 Aug 26, 2025
789442b
feat: #309 - Temporarily restrict chatbot to admins only
StubberG3 Aug 26, 2025
5e186a0
Merge branch 'CodeForPhilly:listOfMed' into balancer/309/login
StubberG3 Aug 26, 2025
0986a17
feat: #309 - Allow viewing and downloading of uploads to be public; e…
StubberG3 Aug 27, 2025
3a7614e
Merge branch 'balancer/309/login' of https://github.com/StubberG3/bal…
StubberG3 Aug 27, 2025
f036d6d
Add comment with workaround PostgreSQL crash with pgvector v0.6.1 on …
sahilds1 Oct 7, 2025
c8a605c
WIP
sahilds1 Oct 30, 2025
df27961
WIP
sahilds1 Nov 5, 2025
d617fc5
Revert formatting changes automatically made by Zed
sahilds1 Nov 13, 2025
ffe1d57
Update embedding_services.py
sahilds1 Nov 13, 2025
e8a04d8
Merge branch 'listOfMed' into 382-postgresql-crash-workaround
sahilds1 Nov 13, 2025
f4adf0f
feat(ci): update containers-publish workflow
themightychris Nov 16, 2025
077804a
Merge pull request #406 from CodeForPhilly/develop
themightychris Nov 16, 2025
e4293fe
refactor(ci): clean up docker and kubernetes deployments
themightychris Nov 16, 2025
643792b
Merge pull request #407 from CodeForPhilly/feat/refactored-deployment
themightychris Nov 17, 2025
4b7a417
Merge pull request #408 from CodeForPhilly/develop
themightychris Nov 17, 2025
4161ecc
fix(ci): remove DJANGO_ALLOWED_HOSTS from secret template
themightychris Nov 17, 2025
fe3663b
Merge branch 'develop' into 382-postgresql-crash-workaround
sahilds1 Nov 17, 2025
bae4e1c
Merge pull request #399 from sahilds1/393-make-the-chatbot-public
sahilds1 Nov 18, 2025
6cf5ad2
Merge pull request #391 from sahilds1/382-postgresql-crash-workaround
taichan03 Nov 18, 2025
89b1042
Merge pull request #413 from CodeForPhilly/listOfMed
taichan03 Nov 18, 2025
ea32814
Add performance tracking to embedding search
sahilds1 Nov 20, 2025
1fc41a7
Simplify embedding search
sahilds1 Nov 24, 2025
156644b
Add persistent tracking for semantic search performance and usage
sahilds1 Nov 26, 2025
6a84359
Add semantic search usage migration file
sahilds1 Nov 26, 2025
685c70a
fix this so it called to prod endpoint
taichan03 Dec 1, 2025
23d29a0
Merge pull request #409 from CodeForPhilly/develop
taichan03 Dec 1, 2025
9a15d55
Merge branch '309-393-test-combined-prs' into balancer/309/login
sahilds1 Dec 1, 2025
11e84f5
Merge pull request #377 from StubberG3/balancer/309/login
sahilds1 Dec 1, 2025
addfcb9
Merge pull request #415 from CodeForPhilly/develop
sahilds1 Dec 1, 2025
456eb42
Remove auth requirement for Chat in both nav files
sahilds1 Dec 1, 2025
cd1ce44
Clear all session storage when auth state changes for chatbot
sahilds1 Dec 2, 2025
4dc8b39
Save patient history data to sessionStorage instead of localStorage
sahilds1 Dec 2, 2025
affe31e
Fix clearing sessionStorage on every page load for unauth users
sahilds1 Dec 2, 2025
74a0b8f
Clearing session storage on LOGIN_FAIL public access design of app
sahilds1 Dec 2, 2025
257b831
Enforce authentication at the route level for adminportal
sahilds1 Dec 2, 2025
7759377
Enforce authentication at the route level for non public routes
sahilds1 Dec 2, 2025
f0eeb35
Make the DrugSummary route and its API endpoints unprotected
sahilds1 Dec 3, 2025
7648a2c
Revert "Make the DrugSummary route and its API endpoints unprotected"
sahilds1 Dec 3, 2025
c792295
Remove comments from auth.ts
sahilds1 Dec 3, 2025
e994ef0
Remove final newline automatically added by Zed
sahilds1 Dec 3, 2025
6b97fa8
Simplify and make ProtectedRoute more robust
sahilds1 Dec 3, 2025
bd817ff
More targeted clearing of sessionStorage
sahilds1 Dec 3, 2025
4ebf265
Simplify ProtectedRoute.tsx
sahilds1 Dec 3, 2025
3cc46e0
Merge pull request #417 from sahilds1/416-fix-unauth-users-access
sahilds1 Dec 3, 2025
5721262
chore: Update Kind configuration, refactor database and allowed hosts…
TineoC Dec 5, 2025
20789ea
Merge remote-tracking branch 'origin/develop'
TineoC Dec 6, 2025
655dcf3
Merge remote-tracking branch 'origin/develop' into 309-393-test-combi…
taichan03 Dec 7, 2025
a9fbde5
WIP
sahilds1 Dec 8, 2025
f165aeb
Handle the initial auth check state
sahilds1 Dec 9, 2025
5df35a8
Replace Loading Text with spinner
sahilds1 Dec 9, 2025
8190390
Fix the Type mismatch in RootState
sahilds1 Dec 9, 2025
3b82d63
Add TODO comments for improvements
sahilds1 Dec 9, 2025
1099665
Remov unecessary fragment
sahilds1 Dec 9, 2025
412e90b
STYLE: Format line length of comment
sahilds1 Dec 9, 2025
abe7e37
WIP
sahilds1 Dec 11, 2025
5189253
Remind the chatbot of the context at the end of the prompt
sahilds1 Dec 11, 2025
4dc2a0f
Restructure chatbot prompt for clarity and context reinforcement
sahilds1 Dec 12, 2025
2b2e24c
Merge pull request #420 from sahilds1/416-bugfix-redirects
taichan03 Dec 12, 2025
1e39362
Merge branch '309-393-test-combined-prs' of https://github.com/CodeFo…
taichan03 Dec 12, 2025
8ca3f0f
this is for switching the button from view pdf to download pdf when t…
taichan03 Dec 12, 2025
c027b8e
Merge pull request #419 from sahilds1/387-update-chatbot-prompt
taichan03 Dec 12, 2025
4297e40
Fix stuck spinner on protected routes by triggering auth verification
sahilds1 Dec 15, 2025
82eed3c
Merge pull request #422 from sahilds1/416-bugfix-stuck-spinner
taichan03 Dec 17, 2025
0278a4e
Merge branch 'develop' into 380-track-chatbot-costs
sahilds1 Dec 18, 2025
7179501
Merge pull request #412 from CodeForPhilly/309-393-test-combined-prs
taichan03 Dec 19, 2025
25866f8
Merge pull request #421 from CodeForPhilly/develop
taichan03 Dec 19, 2025
9ddcd08
Merge branch 'develop' into 380-track-chatbot-costs
sahilds1 Dec 19, 2025
bf79b4a
Fix User logged as None
sahilds1 Dec 19, 2025
163e107
Address the user tracking issue without a 401 error
sahilds1 Dec 19, 2025
b2d264e
Merge pull request #414 from sahilds1/380-track-chatbot-costs
taichan03 Dec 23, 2025
764048c
Update VITE_API_BASE_URL to point to the new prod url
TineoC Dec 28, 2025
901d065
Add GitHub Actions workflow for deploying downstream clusters
TineoC Dec 28, 2025
afb9130
Merge pull request #429 from CodeForPhilly/feat/update-prod-domain
TineoC Dec 31, 2025
8ca20aa
Enhance database connection documentation and configuration
TineoC Jan 5, 2026
b8a3619
Add centralized API endpoints configuration and refactor API calls
TineoC Jan 6, 2026
7a590e5
refactor: use relative URLs and centralize API endpoints
TineoC Jan 6, 2026
70e26ef
remove fiel
TineoC Jan 6, 2026
76cee02
sanitizer
AkhilRB0204 Jan 14, 2026
556d5dd
Merge remote-tracking branch 'origin/develop' into fix/handle-relativ…
TineoC Jan 15, 2026
18be6a7
Merge pull request #432 from TineoC/fix/handle-relative-domains
TineoC Jan 15, 2026
1c458f0
ci: refactor pipelines for continuous deployment to sandbox
TineoC Jan 15, 2026
4942546
Merge pull request #442 from CodeForPhilly/ci/cd-refactor
TineoC Jan 15, 2026
76a99a9
build: use cpu-only torch to reduce image size and fix CI build
TineoC Jan 15, 2026
6bfaa30
Merge pull request #443 from CodeForPhilly/ci/cd-refactor
TineoC Jan 15, 2026
ca8c21f
fix(ci): use actions/checkout@v4 instead of non-existent v5
TineoC Jan 15, 2026
54f02c6
Add a PR template
sahilds1 Jan 19, 2026
d972a7f
Clean up the PR template
sahilds1 Jan 19, 2026
ee0e76c
Update GitHub Sponsors username in FUNDING.yml
sahilds1 Jan 19, 2026
76ecb8b
Merge pull request #444 from sahilds1/187-add-pr-template
taichan03 Jan 20, 2026
0accb30
Fix failing local dev frontend API calls
sahilds1 Jan 20, 2026
c64cc48
Merge pull request #447 from sahilds1/446-bugfix-local-dev-frontend-api
TineoC Jan 26, 2026
31efe1a
fix: local environment
TineoC Jan 26, 2026
4548ad8
fix: STATICFILES_DIRS setting does not exist error
TineoC Jan 26, 2026
a90efd9
undo
TineoC Jan 26, 2026
89d9c6b
fix: deploy API and CI for sandbox + live
TineoC Feb 1, 2026
1b36e6f
chore: kind test script and overlay, fix devbox kind-config path
TineoC Feb 1, 2026
38f61eb
Revert "chore: kind test script and overlay, fix devbox kind-config p…
TineoC Feb 1, 2026
cc62213
fix: CD to sandbox/live GitOps, remove .env.production, SPA catch-all…
TineoC Feb 1, 2026
bec7f2d
docs: PR body - GitOps CD and manual deploy section
TineoC Feb 1, 2026
d2f7d35
chore: remove PR description file from repo
TineoC Feb 1, 2026
a862760
lint errors
TineoC Feb 1, 2026
cc128db
Revert "lint errors"
TineoC Feb 1, 2026
bd359ca
ci(frontend): ignore lint and build failures (continue-on-error)
TineoC Feb 1, 2026
9c23c25
Add macOS Desktop Services Store file to gitignore
sahilds1 Feb 5, 2026
b529b4f
chore: keep pgadmin in local docker-compose
TineoC Feb 6, 2026
c9cd0a3
feat: implement Flux-native image automation and remove redundant dep…
TineoC Feb 7, 2026
8401885
chore: remove all documentation changes from PR
TineoC Feb 7, 2026
31527ee
feat: implement predictable SemVer tagging for Flux automation
TineoC Feb 7, 2026
faa3d54
feat: use git tags for versioning instead of file
TineoC Feb 7, 2026
0dac81d
feat: use dynamic version extraction and generic Flux policies
TineoC Feb 7, 2026
27fc85f
Fix backend network errors and cleanup dev environment
TineoC Feb 7, 2026
abfb24a
feat: make frontend & backend version-aware
TineoC Feb 8, 2026
e25375b
fix: add db to the docker-compose.prod
TineoC Feb 8, 2026
0430a24
ci: simplify container-publish triggers and versioning logic
TineoC Feb 10, 2026
109b6c7
Merge pull request #460 from TineoC/fix/backend-network-and-cleanup
taichan03 Feb 10, 2026
a25bb1b
Merge remote-tracking branch 'origin' into fix/deploy-api-and-ci
TineoC Feb 10, 2026
ee06e75
Merge pull request #455 from TineoC/fix/deploy-api-and-ci
taichan03 Feb 11, 2026
59b40f0
REFACTOR Pull apart get_closest_embeddings to make testing easier
sahilds1 Feb 13, 2026
3ffb74a
ADD Add infra required to run pytest
sahilds1 Feb 13, 2026
12b09a7
ADD Start adding tests for embedding_services"
sahilds1 Feb 13, 2026
2d2ccd1
Fix duplicate healthcheck key for db service build
amahuli03 Feb 16, 2026
01ccf9a
Enhance input sanitization and normalize pronouns
AkhilRB0204 Feb 17, 2026
aa3efcd
Merge remote-tracking branch 'upstream/develop' into bugfix-duplicate…
amahuli03 Feb 17, 2026
da9afaa
DOC Add a note about running pytest in the README
sahilds1 Feb 17, 2026
b08152f
fix: changed link to direct to balancer github page
amahuli03 Feb 18, 2026
b94e998
Fix error 1, added unit tests and more logging
amahuli03 Feb 20, 2026
530b90a
Changed button text from "donate" to "Support Developoment"
amahuli03 Feb 23, 2026
c409689
Merge pull request #462 from amahuli03/bugfix-duplicate-healthchecks-…
sahilds1 Feb 23, 2026
98599e5
Merge pull request #465 from amahuli03/445-update-donate-button
sahilds1 Feb 23, 2026
f96606d
Fix 401 by using adminApi instead of raw axios
amahuli03 Feb 23, 2026
662f29d
Merge pull request #468 from amahuli03/467/unauthorized-pdf-upload
sahilds1 Feb 26, 2026
bbf1034
Fixed wrong API url path in handleDownload
amahuli03 Feb 26, 2026
128418b
Fixed API URL in handleOpen as well
amahuli03 Feb 26, 2026
332af9f
drf-spectacular configuration
amahuli03 Feb 26, 2026
a34a9f8
Added URL routes for API docs generation
amahuli03 Feb 26, 2026
fe660d2
Added OpenAPI security scheme
amahuli03 Feb 26, 2026
3c83abd
Added extend_schema and serializer_class to endpoints that drf-specta…
amahuli03 Feb 26, 2026
5ce7782
Preload SentenceTransformer model at Django startup before traffic is…
sahilds1 Feb 27, 2026
7085aa0
Requested changes: fix patch decorators to point to where openAI is u…
amahuli03 Mar 2, 2026
669f939
Merge remote-tracking branch 'upstream/develop' into 390-bugfix-uploa…
amahuli03 Mar 2, 2026
e6754df
Requested changes: added comments explaining title truncation
amahuli03 Mar 2, 2026
4b4d727
Fix mock setups to match how generate_title accesses title
amahuli03 Mar 2, 2026
a8f5d90
Merge pull request #466 from amahuli03/390-bugfix-upload-file-endpoint
sahilds1 Mar 5, 2026
f2f4274
Merge pull request #471 from amahuli03/file-download-error
sahilds1 Mar 5, 2026
e8b0fc1
fix: treat openAIServices.openAI() return value as string
amahuli03 Mar 5, 2026
e0b7c23
fix mock test setup to return string instead of mocked response object
amahuli03 Mar 6, 2026
d68fa62
fix to make test_falls_back_to_chatgpt_if_no_title_found more robust
amahuli03 Mar 6, 2026
03b7639
Replace block-position title extraction with font-size-based approach
amahuli03 Mar 6, 2026
2a822f6
loosens the title regex to allow years, question
amahuli03 Mar 6, 2026
edf1eb6
Update tests for font-size-based title extraction
amahuli03 Mar 6, 2026
4bae746
update documentation to include instructions about how to use the API…
amahuli03 Mar 10, 2026
6f0deed
update site links on README
amahuli03 Mar 10, 2026
6ae14fe
Merge pull request #479 from amahuli03/update-readme-site-link
sahilds1 Mar 10, 2026
9fa287b
Merge pull request #472 from amahuli03/460/generate-api-documentation
sahilds1 Mar 11, 2026
50a8bd3
Merge branch 'develop' into 441-embedding-models
sahilds1 Mar 11, 2026
795f218
Run python-app workflow on pushes and PRs to develop branch
sahilds1 Mar 11, 2026
d0542df
Merge pull request #457 from sahilds1/456-update-gitignore
sahilds1 Mar 11, 2026
75c1a14
Merge pull request #474 from amahuli03/473/openai-title-generation-at…
sahilds1 Mar 11, 2026
d498a00
Pytest won’t automatically discover config files in subdirectories
sahilds1 Mar 19, 2026
6d3d8d1
Merge branch 'develop' into 441-embedding-models
sahilds1 Mar 19, 2026
3824d81
Suppress E402 import violations
sahilds1 Mar 19, 2026
46e9969
Add build_query tests and document coverage gaps in embedding_services
sahilds1 Mar 20, 2026
64a19ef
Fill test gaps in test_embedding_services
sahilds1 Mar 20, 2026
dec3c12
Fix incorrect build_query test assertions
sahilds1 Mar 20, 2026
25a16b9
feat: migrate manifests from Ingress to Gateway API (HTTPRoute)
TineoC Mar 21, 2026
1ea8894
feat: configure HTTPRoute for sandbox.balancerproject.org
TineoC Mar 21, 2026
1484428
feat: add sandbox and production overlays for HTTPRoute
TineoC Mar 21, 2026
6f50887
cleanup: remove unused dev overlay
TineoC Mar 21, 2026
f9e890a
Guard TransformerModel preload to runserver processes only
sahilds1 Mar 23, 2026
67176a8
Revert GitHub Workflow changes
sahilds1 Mar 25, 2026
d273921
Add section header comments to all four test groups in test_embedding…
sahilds1 Mar 26, 2026
8198574
Document why tests are split by responsibility
sahilds1 Mar 26, 2026
5d8c8b3
Improve logging and comments
sahilds1 Mar 31, 2026
31498dc
Fall back to lazy load using try except block
sahilds1 Mar 31, 2026
a39d33c
Revert settings.py to develop state
sahilds1 Mar 31, 2026
fe1eeca
Manually test fall back to lazy loading
sahilds1 Mar 31, 2026
b4d70f5
fix isSuperuser hardcoded to true on page reload
amahuli03 Mar 31, 2026
23a045b
add IsSuperuser permission class and apply to admin-only endpoints
amahuli03 Mar 31, 2026
21a4205
add AdminRoute component and applly to admin-only pages
amahuli03 Mar 31, 2026
8879f34
lock down CORS to environment-driven allowlist (only dev right now)
amahuli03 Mar 31, 2026
13a0a21
Merge pull request #475 from amahuli03/title-generation-font-size
sahilds1 Mar 31, 2026
9d22066
Merge branch 'develop' into auth-bugs-permission-boundaries
amahuli03 Apr 7, 2026
06ce32e
configure console email backend for local development
amahuli03 Apr 8, 2026
e532915
wire up signup form and email activation Redux actions
amahuli03 Apr 8, 2026
99ac077
build registration form with validation and email sent success state
amahuli03 Apr 8, 2026
3d64d76
build email activation page and add route
amahuli03 Apr 8, 2026
bf2a601
update login page for non-admin users
amahuli03 Apr 12, 2026
f55c1c3
add success states to password reset flow
amahuli03 Apr 12, 2026
fca027a
add "Log In" button to header for unauthenticated users
amahuli03 Apr 12, 2026
52c9efb
add token refresh interceptor to adminApi
amahuli03 Apr 12, 2026
baa4438
Merge pull request #461 from sahilds1/441-embedding-models
sahilds1 Apr 14, 2026
88adfb1
Add issue template
sahilds1 Apr 14, 2026
55acb2e
Update README
sahilds1 Apr 14, 2026
fb3b272
Merge pull request #496 from sahilds1/187-add-docs
sahilds1 Apr 14, 2026
cedc58a
Add sandbox link to README usage section
sahilds1 Apr 14, 2026
4cbb380
feat(gateway): implement self-service TLS via ListenerSet
TineoC Apr 18, 2026
cc3fbe9
fix(gateway): update overlays to patch ListenerSet hostnames
TineoC Apr 18, 2026
b9c9591
feat(gateway): implement HTTP to HTTPS redirect via ListenerSet
TineoC Apr 18, 2026
fb7b270
fix(gateway): patch hostname for redirect HTTPRoute in overlays
TineoC Apr 18, 2026
b1e4918
Configure CORS Allowed Origins via ConfigMaps
TineoC Apr 18, 2026
00250ef
Update sandbox domain for CORS
TineoC Apr 18, 2026
8262de5
Refine ConfigMap overlays using env files and correct sandbox domain
TineoC Apr 18, 2026
d97f0c9
feat: add balancer database cluster manifest
TineoC Apr 18, 2026
92fd46d
remove redundant cluster manifest (moved to infra repo)
TineoC Apr 18, 2026
cf324fb
remove db.yaml from kustomization resources
TineoC Apr 18, 2026
c6f001d
feat: add sandbox overlay with shared db connection details
TineoC Apr 18, 2026
76af69f
feat: update sandbox overlay to use shared db password from secret
TineoC Apr 18, 2026
e48e52d
feat: add configmap for database settings in sandbox overlay
TineoC Apr 18, 2026
d725fe0
feat: update kustomization to use configmap and secret for db settings
TineoC Apr 18, 2026
99523c9
feat: move database manifest to base and update SQL_HOST for shared-c…
TineoC May 1, 2026
79a3232
Add YAML front matter to issue template
sahilds1 May 1, 2026
98ec6b4
Merge branch 'pr-482' into integrate-all-migration
TineoC May 7, 2026
7ab8480
Merge branch 'pr-500' into integrate-all-migration
TineoC May 7, 2026
920e0cd
Merge branch 'pr-501' into integrate-all-migration
TineoC May 7, 2026
06359c5
fix: remove redundant namespace patch on database.yaml
TineoC May 7, 2026
1af2d30
fix: move Database CRD to cfp-sandbox-cluster infra
TineoC May 7, 2026
e8bfa66
fix: move Database CRD to sandbox-only CNPG kustomization
TineoC May 7, 2026
7a0b6ad
fix: remove redundant balancer-redirect HTTPRoute (covered by global …
TineoC May 18, 2026
96c9612
fix: simplify balancer kustomize overlays and add common labels
TineoC May 18, 2026
f71f943
fix: update production to v1.1.5
TineoC May 18, 2026
e0ca2df
fix: use image tags without v prefix (1.1.5)
TineoC May 18, 2026
1072a98
fix: align version label with image tag format (1.1.5)
TineoC May 18, 2026
524d022
fix: remove version label, use image tag as source of truth
TineoC May 18, 2026
a033298
feat(sandbox): add balancer-db-credentials SealedSecret for CNPG
May 18, 2026
6249ed3
chore(sandbox): remove cnpg overlay — CNPG resources belong in cfp-sa…
May 18, 2026
5d740f6
Delete architectural issue template
sahilds1 May 23, 2026
ccf17b0
Merge pull request #506 from sahilds1/187-improve-docs
sahilds1 May 23, 2026
020e762
Merge branch 'develop' into integrate-all-migration
TineoC May 24, 2026
c88a4d8
Merge pull request #507 from TineoC/integrate-all-migration
TineoC May 24, 2026
18f2273
Merge branch 'develop' into auth-bugs-permission-boundaries
sahilds1 May 27, 2026
d32020a
Merge branch 'develop' into auth-registration-email-activation
sahilds1 May 27, 2026
1230c2d
Merge branch 'develop' into auth-login-ux-token-refresh
sahilds1 May 27, 2026
38a437d
Merge pull request #489 from amahuli03/auth-bugs-permission-boundaries
sahilds1 May 27, 2026
9ed73e6
Merge branch 'develop' into auth-registration-email-activation
sahilds1 May 27, 2026
50fad9f
Merge pull request #493 from amahuli03/auth-registration-email-activa…
sahilds1 May 27, 2026
dbf8b45
Merge branch 'develop' into auth-login-ux-token-refresh
sahilds1 May 27, 2026
ab498c0
Clean up CORS_ALLOWED_ORIGINS configuration
sahilds1 May 27, 2026
8dd740a
Clean up CORS_ALLOWED_ORIGINS configuration
sahilds1 May 27, 2026
c798f73
Merge pull request #495 from amahuli03/auth-login-ux-token-refresh
sahilds1 May 27, 2026
79982b6
Rename 'Click To Enter New Patient' button to 'Enter New Patient'
c-tonneslan May 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
server/.gitignore
server/Dockerfile
server/entrypoint.sh
15 changes: 15 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# These are supported funding model platforms

github: [sahilds1] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
polar: # Replace with a single Polar username
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
thanks_dev: # Replace with a single thanks.dev username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
27 changes: 0 additions & 27 deletions .github/ISSUE_TEMPLATE/architectural-issue.md

This file was deleted.

32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Issue template
about: Help push the project forward
title: ''
labels: ''
assignees: ''

---

## Title
<!-- Title: [Type]: Short description of the problem or goal -->

## Background
<!-- Why does this change need to happen? -->

## Existing Behavior
<!-- What code or docs are changing? Link or paste as needed -->

## Acceptance Criteria
- [] <!-- What does done look like? -->

## Approach
<!-- How are you tackling this? Update as you go -->

## References
<!-- Anything useful — docs, links, decisions -->

## Risks and Rollback
<!-- Anything that could go wrong, or leave blank if low risk -->

## Screenshots / Recordings
<!-- Before/after visuals or console output if helpful -->
71 changes: 39 additions & 32 deletions .github/workflows/containers-publish.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: "Containers: Publish"

on:
release:
types: [published]
push:
tags: ["v*"]
branches: [develop]

permissions:
packages: write
Expand All @@ -12,10 +14,10 @@ jobs:
name: Build and Push
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Login to ghcr.io Docker registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
Expand All @@ -24,7 +26,18 @@ jobs:
- name: Compute Docker container image addresses
run: |
DOCKER_REPOSITORY="ghcr.io/${GITHUB_REPOSITORY,,}"
DOCKER_TAG="${GITHUB_REF:11}"
git fetch --tags --force

if [[ "${{ github.event_name }}" == "release" ]]; then
TAG="${GITHUB_REF#refs/tags/}"
DOCKER_TAG="${TAG#v}"
else
# Pre-release for develop
BASE_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
VERSION="${BASE_TAG#v}"
TIMESTAMP=$(date +%Y%m%d%H%M%S)
DOCKER_TAG="${VERSION}-dev.${TIMESTAMP}"
fi

echo "DOCKER_REPOSITORY=${DOCKER_REPOSITORY}" >> $GITHUB_ENV
echo "DOCKER_TAG=${DOCKER_TAG}" >> $GITHUB_ENV
Expand All @@ -34,36 +47,30 @@ jobs:
# - name: 'Pull previous Docker container image: :latest'
# run: docker pull "${DOCKER_REPOSITORY}:latest" || true

- name: "Pull previous Docker container image: frontend-static:latest"
run: docker pull "${DOCKER_REPOSITORY}/frontend-static:latest" || true
- name: "Pull previous Docker container image: app:latest"
run: docker pull "${DOCKER_REPOSITORY}/app:latest" || true

- name: "Build Docker container image: frontend-static:latest"
- name: "Build Docker container image: app:latest"
run: |
docker build \
--cache-from "${DOCKER_REPOSITORY}/frontend-static:latest" \
--file frontend/Dockerfile.demo \
--build-arg SERVER_NAME=localhost \
--tag "${DOCKER_REPOSITORY}/frontend-static:latest" \
--tag "${DOCKER_REPOSITORY}/frontend-static:${DOCKER_TAG}" \
frontend
- name: "Push Docker container image frontend-static:latest"
run: docker push "${DOCKER_REPOSITORY}/frontend-static:latest"
--cache-from "${DOCKER_REPOSITORY}/app:latest" \
--file Dockerfile.prod \
--tag "${DOCKER_REPOSITORY}/app:latest" \
--tag "${DOCKER_REPOSITORY}/app:${DOCKER_TAG}" \
--build-arg VERSION="${DOCKER_TAG}" \
.

- name: "Push Docker container image frontend-static:v*"
run: docker push "${DOCKER_REPOSITORY}/frontend-static:${DOCKER_TAG}"
#
#
# - name: 'Build Docker container image: backend:latest'
# run: |
# cd backend && \
# make && \
# docker image tag "${DOCKER_REPOSITORY}/backend/local:latest" "${DOCKER_REPOSITORY}/backend:latest"
#
# - name: Push Docker container image backend:latest
# run: docker push "${DOCKER_REPOSITORY}/backend:latest"
#
# - name: Push Docker container image backend:v*
# run: docker push "${DOCKER_REPOSITORY}/backend:${DOCKER_TAG}"
- name: "Push Docker container image app:latest"
run: docker push "${DOCKER_REPOSITORY}/app:latest"

# - name: Push Docker container image :v*"
# run: docker push "${DOCKER_REPOSITORY}:${DOCKER_TAG}"
- name: "Push Docker container image app:v*"
run: docker push "${DOCKER_REPOSITORY}/app:${DOCKER_TAG}"

- name: Save Docker Tag
run: echo "${DOCKER_TAG}" > docker_tag.txt

- name: Upload Docker Tag
uses: actions/upload-artifact@v4
with:
name: docker-tag
path: docker_tag.txt
35 changes: 35 additions & 0 deletions .github/workflows/frontend-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "Frontend: Lint and Build"

on:
push:
branches: [develop]
pull_request:
branches: [develop]

jobs:
frontend:
name: Lint and Build
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
cache: "npm"
cache-dependency-path: frontend/package-lock.json

- name: Install dependencies
run: npm ci --legacy-peer-deps

- name: Lint
run: npm run lint
continue-on-error: true

- name: Build
run: npm run build
continue-on-error: true
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
config/*
config/env/*
!config/env/*.example
.idea/
env*
.DS_Store
165 changes: 165 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added
- **Conditional PDF Access Based on Authentication** (2025-01-XX)
- Logged-in users see "View PDF" button that opens PDF viewer in new tab
- Non-logged-in users see "Download PDF" button that directly downloads the file
- Backend: Added `upload_file_guid` field to risk/source API responses
- Frontend: Conditional rendering based on Redux authentication state
- Fallback GUID extraction from URL if backend field is missing

**Backend Changes:**

*File: `server/api/views/risk/views_riskWithSources.py`*
```python
# Added to source_info dictionary in 3 locations (lines ~138, ~252, ~359):
source_info = {
'filename': filename,
'title': getattr(embedding, 'title', None),
'publication': getattr(embedding, 'publication', ''),
'text': getattr(embedding, 'text', ''),
'rule_type': medrule.rule_type,
'history_type': medrule.history_type,
'upload_fileid': getattr(embedding, 'upload_file_id', None),
'page': getattr(embedding, 'page_num', None),
'link_url': self._build_pdf_link(embedding),
'upload_file_guid': str(embedding.upload_file.guid) if embedding.upload_file else None # NEW
}
```

**Frontend Changes:**

*File: `frontend/src/pages/PatientManager/PatientManager.tsx`*
```typescript
// Added imports:
import { useSelector } from "react-redux";
import { RootState } from "../../services/actions/types";

// Added hook to get auth state:
const { isAuthenticated } = useSelector((state: RootState) => state.auth);

// Passed to PatientSummary:
<PatientSummary
// ... existing props
isAuthenticated={isAuthenticated}
/>
```

*File: `frontend/src/pages/PatientManager/PatientSummary.tsx`*
```typescript
// Updated interface:
interface PatientSummaryProps {
// ... existing props
isAuthenticated?: boolean; // NEW
}

// Updated SourceItem type:
type SourceItem = {
// ... existing fields
upload_file_guid?: string | null; // NEW
};

// Added helper function:
const extractGuidFromUrl = (url: string): string | null => {
try {
const urlObj = new URL(url, window.location.origin);
return urlObj.searchParams.get('guid');
} catch {
return null;
}
};

// Updated component:
const PatientSummary = ({
// ... existing props
isAuthenticated = false, // NEW
}: PatientSummaryProps) => {
const baseURL = import.meta.env.VITE_API_BASE_URL || ''; // NEW

// Updated MedicationItem props:
const MedicationItem = ({
// ... existing props
isAuthenticated, // NEW
baseURL, // NEW
}: {
// ... existing types
isAuthenticated: boolean; // NEW
baseURL: string; // NEW
}) => {

// Updated MedicationTier props:
const MedicationTier = ({
// ... existing props
isAuthenticated, // NEW
baseURL, // NEW
}: {
// ... existing types
isAuthenticated: boolean; // NEW
baseURL: string; // NEW
}) => (
// ... passes to MedicationItem
<MedicationItem
// ... existing props
isAuthenticated={isAuthenticated}
baseURL={baseURL}
/>
);

// Conditional button rendering:
{s.link_url && (() => {
const guid = s.upload_file_guid || extractGuidFromUrl(s.link_url);
if (!guid) return null;

return isAuthenticated ? (
<a
href={s.link_url}
target="_blank"
rel="noopener noreferrer"
className="ml-2 px-2 py-1 text-xs bg-blue-100 text-blue-700 rounded hover:bg-blue-200 transition-colors"
>
View PDF
</a>
) : (
<a
href={`${baseURL}/v1/api/uploadFile/${guid}`}
download
className="ml-2 px-2 py-1 text-xs bg-green-100 text-green-700 rounded hover:bg-green-200 transition-colors"
>
Download PDF
</a>
);
})()}

// Updated all MedicationTier calls to pass new props:
<MedicationTier
// ... existing props
isAuthenticated={isAuthenticated}
baseURL={baseURL}
/>
```

### Fixed
- **URL Route Case Consistency** (2025-01-XX)
- Fixed case mismatch between backend URL generation (`/drugsummary`) and frontend route (`/drugSummary`)
- Updated all references to use consistent camelCase `/drugSummary` route
- Affected files: `views_riskWithSources.py`, `Layout_V2_Sidebar.tsx`, `Layout_V2_Header.tsx`, `FileRow.tsx`

- **Protected Route Authentication Flow** (2025-01-XX)
- Fixed blank page issue when opening protected routes in new tab
- `ProtectedRoute` now waits for authentication check to complete before redirecting
- Added `useAuth()` hook to `Layout_V2_Main` to trigger auth verification

### Changed
- **PatientSummary Component** (2025-01-XX)
- Now receives `isAuthenticated` prop from Redux state
- Props passed through component hierarchy: `PatientManager` → `PatientSummary` → `MedicationTier` → `MedicationItem`
- Added `baseURL` constant for API endpoint construction

## [Previous versions would go here]
Loading