Skip to content

feat: add browse shelves page to inventory track section#443

Open
udayjain26 wants to merge 3 commits intocrbnos:mainfrom
udayjain26:feature/issue-391-browse-shelves
Open

feat: add browse shelves page to inventory track section#443
udayjain26 wants to merge 3 commits intocrbnos:mainfrom
udayjain26:feature/issue-391-browse-shelves

Conversation

@udayjain26
Copy link
Contributor

@udayjain26 udayjain26 commented Jan 20, 2026

Summary

  • Add a new "Shelves" page under the Track section in inventory module
  • Display all shelves with item counts and total quantities
  • Click on a shelf to see items stored on that shelf in a detail panel
  • Search functionality that searches both shelf names and items on shelves
  • Link from item inventory details to browse shelves page

Test plan

  • Navigate to Inventory > Track > Shelves
  • Verify shelves list displays with item counts and quantities
  • Click on a shelf to open detail panel
  • Verify items on shelf are displayed correctly
  • Test search functionality for shelf names and item names
  • Test location dropdown filter
  • Test navigation from item inventory page to shelf

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.
Screen.Recording.2026-01-20.at.13.09.07.mov

Builds #391

Add a new "Shelves" page under the Track section that allows users to
browse items by shelf. Features include:

- Browse all shelves with item counts and total quantities
- Search shelves by name or by items they contain
- Click on a shelf to see all items stored on it
- Click on an item to navigate to its inventory details
- Added link from item inventory details back to the shelf

Builds crbnos#391
Replace blue underlined text links with external link icons that
appear on row hover for consistency with rest of the app.

Builds crbnos#391
@vercel
Copy link

vercel bot commented Jan 20, 2026

@udayjain26 is attempting to deploy a commit to the Carbon Team on Vercel.

A member of the Team first needs to authorize it.

@udayjain26
Copy link
Contributor Author

@crudmachine @barbinbrad Happy Tuesday, guys. I've laid out the basic page for browsing shelves and looking at items within a shelf and navigating between items and shelves.

A couple things tho:

  1. I could not think of what more useful data to add to the shelf rows that would add value to the end user. A table feels overkill, lmk if you have UI/UX in mind that makes sense for this shelves page.
  2. Would it be better to remove the location column altogether since we already have location selected, it's kinda redundant.
  3. Currently, the same searchbar filters for both items in a shelf and the shelf name too, should this filter be visually segregated?

lmk how to proceed, thanks

@crudmachine
Copy link
Collaborator

@udayjain26 Great work!

For 2. Yes, Location column could be removed.
For 3. You could have the search placeholder text me 'Search shelf or item' (or remove the Search item functionality but I think it's good how you have it - just could update the placeholder text)

Comment on lines 1479 to 1487
const allShelvesQuery = client
.from("shelf")
.select("id, name, locationId, active, createdAt, updatedAt")
.eq("companyId", companyId)
.eq("locationId", locationId)
.eq("active", true)
.order("name", { ascending: true });

const allShelves = await allShelvesQuery;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should be applying the generic queries and search here so that we get paginated results for shelves.

locationId: string;
};

const BrowseShelvesTable = memo(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you rename these folder/files/component/types/routes to ShelvesTable.tsx, instead of BrowseShelvesTables.tsx -- the convention in the repo is just to use [Noun][Component] instead of [Verb][Noun][Component]

batchPropertyOrder: (itemId: string) =>
generatePath(`${x}/inventory/batch-property/${itemId}/property/order`),
billing: `${x}/settings/billing`,
browseShelf: (id: string) =>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here, this should just be shelf:

@udayjain26
Copy link
Contributor Author

hey @barbinbrad there is a slight conflict with naming:

  1. ui/Shelves/ folder already exists with ShelvesTable.tsx for shelf CRUD management (the Configure section thing)
  2. shelf: and shelves: paths already exist in path.ts pointing to /inventory/shelves

Can I go with ShelfInventory type naming to avoid this?

- Apply DB-level pagination using setGenericQueryFilters
- Rename BrowseShelves to ShelfInventory (avoids conflict with existing Shelves folder)
- Rename routes from browse-shelves to shelf-inventories
- Remove redundant Location column from table
- Update search placeholder to "Search shelf or item..."
- Restore item name search while maintaining DB-level pagination
@udayjain26
Copy link
Contributor Author

@crudmachine @barbinbrad I have refactored the code based on feedback, thank you

@udayjain26
Copy link
Contributor Author

@barbinbrad, any feedback for me on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants