feat(frontend): claim, sign in, persons, camera upload and settings - #15
Merged
Merged
Conversation
…n step nevus openapi prints the schema of a throwaway application, and frontend/openapi.json holds the committed copy. CI regenerates the snapshot and the typed client and fails when either is stale; just openapi refreshes both. The generated files are excluded from Prettier so the comparison is byte for byte. Signed-off-by: Jose David <josedalmena@gmail.com>
pydantic-settings decodes list-typed variables as JSON before validators run, so the documented form nevus.example.com crashed the container at start-up. The field is now marked NoDecode and split on commas, with a test that goes through the environment. Signed-off-by: Jose David <josedalmena@gmail.com>
First usable interface for phase 1: the claim page for a fresh instance, sign-in, the persons list with creation, a person page that takes a photo with the device camera (or picks a file) and shows the scrubbed thumbnails with a preview dialog, and settings for language, theme and uncertainty display stored with the account. Requests go through a typed client generated from the OpenAPI snapshot; redirects are derived from session state. Strings in English and Spanish; five component tests run against an in-memory API mock. Signed-off-by: Jose David <josedalmena@gmail.com>
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.
What
The first usable interface for phase 1, plus the plumbing that keeps it honest with the backend.
frontend/openapi.json, whichnevus openapiexports. CI fails when the snapshot or the generated types are stale (just openapirefreshes both).<input type=file capture>) or file pick, thumbnail grid and preview dialog with trash, settings (language, theme, uncertainty display) stored with the account.NEVUS_ALLOWED_HOSTS=nevus.example.comcrashed at start-up because pydantic-settings decoded the list as JSON. Now a plain comma-separated value works, with a test.Verification
/and/loginanswer 200, manifest and service workerno-cache, self-hosted font served asfont/woff2, claim 201, person 201, camera upload 201, thumbnail 200, preferences patched and read back, cross-site POST 403, unknown public host 421.