Remove host remark length limit#172
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
PR Summary
|
Greptile SummaryThis PR removes the 40-character Zod validation limit on the host
Confidence Score: 4/5Safe to merge; the migration is non-destructive and both contract files change only a validation removal. The DB migration is correct and backward-compatible. The main open question is whether dropping all upper-bound validation on Both Zod command files ( Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[API Request: remark field] --> B{Zod validation\ncreate.command.ts}
B -- "min(1) ✅\nmax: none ⚠️" --> C[Controller]
A2[API Request: remark field] --> B2{Zod validation\nupdate.command.ts}
B2 -- "optional, no min,\nno max ⚠️" --> C
C --> D[Prisma ORM]
D --> E[(PostgreSQL\nhosts.remark TEXT)]
|
I checked almost all clients and did not find any hard 40-character limits for host names. I think the current limit is unnecessary and sometimes only gets in the way.
For example, I recently wanted to create an experimental configuration, but the 40-character limit made it difficult to describe what the profile was for, so I had to omit or shorten a lot of details.
This PR should remove the limit by updating the backend contract and persistence layer. Frontend builds that consume the updated contract will inherit the relaxed validation.