feat: remove tags from UI and backend (POLY-77)#83
Conversation
📝 WalkthroughWalkthroughThis PR removes tag functionality across the entire codebase. Changes span backend schema and Convex functions, shared type definitions, test coverage, and frontend UI components, eliminating tag validation, filtering, storage, and display capabilities throughout the application. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
00547aa to
0195763
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
frontend/app/(tabs)/index.tsx (1)
35-52: Use a stable row key here.
rowKeychanges whenever the last partial row gets more items after a "load more", so React remounts that whole row and its cards unnecessarily.startIndexis stable for this append-only grid.Proposed diff
for (let startIndex = 0; startIndex < items.length; startIndex += size) { const rowItems = items.slice(startIndex, startIndex + size); - const rowKey = rowItems.map((item) => item._id).join('-'); + const rowKey = `row-${startIndex}`; const fillerKeys: string[] = [];🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@frontend/app/`(tabs)/index.tsx around lines 35 - 52, The current buildWebRows function uses a rowKey derived from concatenating item._id values which changes when items are appended, causing React to remount rows; change the row key to a stable identifier such as startIndex (or a combination like `row-${startIndex}`) when pushing rows in buildWebRows so that the key remains stable across "load more" appends and prevents unnecessary remounting of the row and its cards.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@frontend/app/`(tabs)/index.tsx:
- Around line 35-52: The current buildWebRows function uses a rowKey derived
from concatenating item._id values which changes when items are appended,
causing React to remount rows; change the row key to a stable identifier such as
startIndex (or a combination like `row-${startIndex}`) when pushing rows in
buildWebRows so that the key remains stable across "load more" appends and
prevents unnecessary remounting of the row and its cards.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 6e1b0f5e-a443-4c01-b9be-28917abc9c0f
📒 Files selected for processing (16)
backend/convex/__tests__/listings-pagination.test.tsbackend/convex/__tests__/listings.test.tsbackend/convex/__tests__/schema.test.tsbackend/convex/__tests__/testUtils.tsbackend/convex/listings.tsbackend/convex/savedListings.tsbackend/convex/schema.tsfrontend/app/(tabs)/index.tsxfrontend/app/listings/[id].tsxfrontend/app/listings/[id]/edit.tsxfrontend/app/listings/new.tsxfrontend/components/FilterBar.tsxfrontend/components/ListingCard.tsxfrontend/components/TagInput.tsxfrontend/components/TagPicker.tsxpackages/shared/types/listing.ts
💤 Files with no reviewable changes (13)
- frontend/app/listings/new.tsx
- backend/convex/tests/schema.test.ts
- packages/shared/types/listing.ts
- frontend/app/listings/[id]/edit.tsx
- frontend/components/ListingCard.tsx
- backend/convex/tests/listings-pagination.test.ts
- backend/convex/tests/testUtils.ts
- frontend/app/listings/[id].tsx
- backend/convex/savedListings.ts
- backend/convex/tests/listings.test.ts
- frontend/components/TagInput.tsx
- frontend/components/TagPicker.tsx
- backend/convex/schema.ts
Linear: POLY-77
Summary
Removes the tags feature entirely from both the UI and backend. Tags are redundant now that search and category filtering provide sufficient discoverability.
Changes
Backend
tagsfield from listings schema andby_tagindexTAG_CONSTRAINTS,validateTags(),normalizeSearchTags()from listings.tstagsarg fromcreateListing,updateListing,internalCreateListing,internalUpdateListing,getListings,searchAndFilterListingstagsfromPublicListingtype and mapping in savedListings.tsFrontend
TagInputandTagPickercomponentsselectedTagsstate, tag URL params, and tag query args from home screentagsfrom ListingCard typeShared
tagsfromListingandCreateListingInputin packages/sharedTests
baseArgsfixtures,createTestListinghelper, and schema field assertionsTesting
Made with Kiro
Summary by CodeRabbit