Fix input validation, type safety, and missing config files in apps/me#177
Merged
taterhead247 merged 3 commits intofeat/mefrom Mar 13, 2026
Merged
Fix input validation, type safety, and missing config files in apps/me#177taterhead247 merged 3 commits intofeat/mefrom
taterhead247 merged 3 commits intofeat/mefrom
Conversation
12 tasks
Co-authored-by: taterhead247 <26818765+taterhead247@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add initial setup for apps/me profile manager
Fix input validation, type safety, and missing config files in apps/me
Mar 13, 2026
pstaylor-patrick
pushed a commit
that referenced
this pull request
Apr 9, 2026
#177) * Initial plan * Fix validation, type safety, and add missing config files in apps/me Co-authored-by: taterhead247 <26818765+taterhead247@users.noreply.github.com> * improved test that this sub-pr broke --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: taterhead247 <26818765+taterhead247@users.noreply.github.com> Co-authored-by: Tackle <damon.vinciguerra@gmail.com>
pstaylor-patrick
pushed a commit
that referenced
this pull request
Apr 9, 2026
#177) * Initial plan * Fix validation, type safety, and add missing config files in apps/me Co-authored-by: taterhead247 <26818765+taterhead247@users.noreply.github.com> * improved test that this sub-pr broke --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: taterhead247 <26818765+taterhead247@users.noreply.github.com> Co-authored-by: Tackle <damon.vinciguerra@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.
Several bugs in the
apps/meAPI routes allowed malformed requests to slip through or throw unexpectedly, andUserUpsert.metawas typed inconsistently with the actual DB schema.Validation fixes
Falsy checks (
!body.orgId) incorrectly reject0as an invalid ID. Replaced with explicitnull/undefined+typeofguards in both the roles and positions routes:Avatar route type safety
formData.get("file")can return astring. The unsafeas File | nullcast would propagate tofile.type/file.arrayBuffer()and throw. Replaced with aninstanceof Fileguard returning a 400 on mismatch. Also corrected the error message which still referencedgifafter it was removed fromALLOWED_TYPES.UserUpsert.metatype alignmentmetawas typed asstringinUserUpsertbut used asRecord<string, unknown>everywhere else (merging, serializing, DB JSON column). Changed toRecord<string, unknown>to match the actual contract.Missing config files
Added
.nvmrc,.firebaserc, and.env.firebase.exampleunderapps/me/— these were referenced in the README but absent from the repo.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.