Skip to content

refactor: misc code quality improvements (ThreeWayToggle naming, z.infer clarification, sortDirection extraction, vote utility move) #410

@coderabbitai

Description

@coderabbitai

Several small code quality TODOs that can be addressed together:

File Line TODO
src/components/ui/ThreeWayToggle.tsx 32 Find a better name for the ThreeWayToggle component
src/schemas/gpu.ts 46 Clarify why z.infer is used instead of z.input / z.output and add a comment
src/schemas/common.ts 8 Extract sortDirection enum into a shared constant
src/utils/vote.ts 7 Move the success-rate color utility to badgeColors.ts
src/server/services/user-profile.service.ts 32 Use constants or enums for profile reason type values
src/components/ui/image-selectors/ImageSelectorSwitcher.tsx 25 Consider adding IGDB as an image source option

Action required:
Address each item as a small independent change within a single PR.


Requested by @Producdevity — related to PR #375

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions