GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(folders): show the folder trail in table and knowledge base headers by waleedlatif1 · Pull Request #6515 · simstudioai/sim

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • A table or knowledge base opened from inside a folder rendered Tables / name, dropping every folder between it and the root, while a file's header showed the full Files / docs / name path. The detail pages never read the resource's own folderId, so the trail could not include it.
  • Rather than patch the two headers, all six foldered surfaces (Files, Tables, Knowledge — list and detail) now build their trail from one shared builder:
    • folderAncestorChain(folderId, lookup) in lib/folders/tree.ts is the single upward walk. Both getFolderPath variants delegate to it. The two lock predicates deliberately keep their inline walks — they short-circuit at the first locked ancestor on a per-row render path.
    • folderBreadcrumbItems takes a trailing slot for detail pages, as a discriminated union so an open-folder rename can't be passed alongside it and silently dropped.
    • useFolderAncestors owns the folder tree plus the foldersResolved staleness rule; useFolderNavigation delegates to it.
    • FOLDERED_RESOURCE_HEADERS owns each resource's root label, root icon, and list path, which seven sites previously restated.
  • Files' list trail moved off splitting the materialized path string, which couldn't tell two same-named siblings apart, onto the shared parentId walk.
  • Also fixes the Files loading trail, whose folder crumbs used the nuqs setter while rendering on the file detail route — appending ?folderId= to the open file's own URL instead of navigating to the list.

Type of Change

  • Bug fix

Testing

tsc --noEmit, bun run lint:check, and bun run check:react-query / check:api-validation / check:client-boundary all clean. 2902 tests across 249 files pass, including new coverage for the chain walk and the detail-page trail; I verified those tests fail against a deliberately broken implementation.

Not yet verified in a browser — the dev server won't start from a git worktree (Turbopack resolves the outer repo as root). The visual change is the folder segments now appearing in table/KB headers, so it's worth a look on the preview before merge.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

greptile-apps[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@vercel

vercel Bot commented Aug 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Aug 11, 2026 1:31am

Request Review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cursor

cursor Bot commented Aug 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

PR Summary

Medium Risk
Cross-resource header and navigation changes with shared folder-tree correctness rules (foldersResolved, partial chains); no auth or data-model changes, but regressions would show wrong paths or broken crumb navigation.

Overview
Foldered Files, Tables, and Knowledge list and detail headers now build the same trail from one path: walk parentId via folderAncestorChain, validate completeness with breadcrumbFolderChain, and assemble crumbs with folderBreadcrumbItems (list mode keeps rename/menu on the open folder; detail mode uses trailing crumbs so every folder segment navigates).

Table and knowledge base detail pages were missing intermediate folders because they never used the resource’s folderId; they now load the chain through useFolderAncestors. List navigation still uses useFolderNavigation, which delegates ancestry to that hook and exposes ancestors instead of duplicating tree fetch logic.

FOLDERED_RESOURCE_HEADERS and folderedResourceListHref / folderListHref centralize root labels, icons, and list URLs (including Recently deleted folder links). Files list breadcrumbs no longer split a materialized path string (ambiguous siblings); loading/detail folder crumbs navigate to the files list route instead of mutating the open file URL with nuqs.

Reviewed by Cursor Bugbot for commit 1df52e0. Configure here.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@greptile-apps

greptile-apps Bot commented Aug 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR unifies breadcrumb construction across foldered resource surfaces so list and detail headers show complete folder ancestry.

  • Adds shared folder-chain, breadcrumb, navigation, and resource-header helpers.
  • Updates Files, Tables, and Knowledge surfaces to use resource folderId ancestry.
  • Routes document breadcrumb navigation through the existing unsaved-edit guard.
  • Adds coverage for ancestor traversal, incomplete trees, cycles, and detail-page trails.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/components/folders/folder-breadcrumbs.ts Introduces shared folder-chain validation and list/detail breadcrumb construction.
apps/sim/app/workspace/[workspaceId]/components/folders/use-folder-ancestors.ts Centralizes folder-tree fetching, resolution state, and ancestor derivation.
apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/document.tsx Adds full knowledge-base folder ancestry and guards route-leaving breadcrumbs while the chunk editor is open.
apps/sim/app/workspace/[workspaceId]/files/files.tsx Replaces path-string breadcrumb reconstruction with parent-ID traversal and correct list-route navigation.
apps/sim/app/workspace/[workspaceId]/tables/[tableId]/table.tsx Adds the table's folder ancestry to its detail-page header.
apps/sim/lib/folders/tree.ts Provides the shared cycle-safe ancestor walk used by foldered surfaces.

Reviews (4): Last reviewed commit: "chore(folders): tighten the shared bread..." | Re-trigger Greptile

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

greptile-apps[bot]
greptile-apps Bot reviewed Aug 11, 2026
View reviewed changes
Comment thread apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/document.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

@waleedlatif1
waleedlatif1 force-pushed the folder-toolbar-header branch from 6379114 to e54c733 Compare August 11, 2026 01:14
@vercel
vercel Bot temporarily deployed to Preview August 11, 2026 01:14 Inactive
@waleedlatif1

waleedlatif1 commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator Author

@greptile

greptile-apps[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@waleedlatif1

waleedlatif1 commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator Author

@cursor review

cursor[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cursor[bot]
cursor Bot reviewed Aug 11, 2026
View reviewed changes

@cursor cursor Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit e54c733. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
waleedlatif1 added 3 commits August 10, 2026 18:20
@waleedlatif1
fix(folders): show the folder trail in table and knowledge base headers
4997440
A table or knowledge base opened from inside a folder rendered `Tables / name`,
dropping every folder between it and the root — while a file's header showed the
full `Files / docs / name` path. The detail pages never read the resource's own
`folderId`, so the trail could not include it.

Converge all six foldered surfaces on one builder instead of fixing the two
headers in place:

- `folderAncestorChain(folderId, lookup)` in `lib/folders/tree.ts` is now the
  single upward walk. Both `getFolderPath` variants delegate to it; the two lock
  predicates deliberately keep their inline walks, which short-circuit at the
  first locked ancestor on a per-row render path.
- `folderBreadcrumbItems` takes a `trailing` slot for detail pages, as a
  discriminated union so an open-folder rename cannot be passed alongside it and
  silently dropped.
- `useFolderAncestors` owns the tree plus the `foldersResolved` staleness rule;
  `useFolderNavigation` now delegates to it.
- `FOLDERED_RESOURCE_HEADERS` owns each resource's root label, root icon, and
  list path, which seven sites previously restated.

Files' list trail moved off splitting the materialized `path` string, which
could not tell two same-named siblings apart, onto the shared parentId walk.

Also fixes the Files loading trail, whose folder crumbs used the nuqs setter
while rendering on the file detail route — appending `?folderId=` to the open
file's own URL instead of navigating to the list.
@waleedlatif1
fix(knowledge): confirm before a breadcrumb navigates away from an un…
010608d
…saved chunk
@waleedlatif1
fix(knowledge): source the pluralized root label from the folder regi…
e409ad9
…stry
@waleedlatif1
waleedlatif1 force-pushed the folder-toolbar-header branch from e54c733 to e409ad9 Compare August 11, 2026 01:23
@vercel
vercel Bot temporarily deployed to Preview August 11, 2026 01:24 Inactive
@waleedlatif1

waleedlatif1 commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator Author

@greptile

greptile-apps[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@waleedlatif1

waleedlatif1 commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator Author

@cursor review

cursor[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cursor[bot]
cursor Bot reviewed Aug 11, 2026
View reviewed changes

@cursor cursor Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit e409ad9. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@waleedlatif1
chore(folders): tighten the shared breadcrumb docs and dedupe the anc…
1df52e0
…estry type
@waleedlatif1

waleedlatif1 commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator Author

@greptile

greptile-apps[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@waleedlatif1

waleedlatif1 commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator Author

@cursor review

cursor[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vercel
vercel Bot temporarily deployed to Preview August 11, 2026 01:31 Inactive
cursor[bot]
cursor Bot reviewed Aug 11, 2026
View reviewed changes

@cursor cursor Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 1df52e0. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@waleedlatif1
waleedlatif1 merged commit fff6606 into staging Aug 11, 2026
30 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@waleedlatif1
waleedlatif1 deleted the folder-toolbar-header branch August 11, 2026 01:38
This was referenced Aug 11, 2026
v0.8.0: new workflow UI, v2 API, salesforce JWT, provenance improvements, incidentio tools, block retries #6533
Closed
v0.8.0: desktop app, workflow UI, v2 endpoints #6606
Merged

This branch was previously deployed

1 inactive deployment
Preview — 1df52e02 Deployed Aug 11, 2026 by vercel[bot]
View deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@greptile-apps greptile-apps[bot] greptile-apps[bot] left review comments
@cursor cursor[bot] cursor[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@waleedlatif1
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.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.