Skip to content

42 sidebar folder tree - #72

Merged
PreciousOritsedere merged 33 commits into
mainfrom
42-sidebar-folder-tree
Aug 19, 2026
Merged

42 sidebar folder tree#72
PreciousOritsedere merged 33 commits into
mainfrom
42-sidebar-folder-tree

Conversation

@PreciousOritsedere

Copy link
Copy Markdown
Contributor

This PR addresses #42

@jeswr jeswr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Rather than caching just within the FolderTree component; we should be globally caching responses. This will prevent needing to re-fetch container contents between the sidebar view and the main file/folder view.

Long term we should migrate to something like https://github.com/jeswr/solid-sdk/tree/main/packages/solid-offline

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

@PreciousOritsedere PreciousOritsedere linked an issue Aug 18, 2026 that may be closed by this pull request
Comment on lines +60 to +83
const closeRenameDialog = useCallback(() => {
setShowRenameDialog(false);
setFileToRename(null);
}, []);

const closePreviewModal = useCallback(() => {
setShowPreviewModal(false);
setFileToPreview(null);
}, []);

const closeMoveDialog = useCallback(() => {
setShowMoveDialog(false);
setFileToMove(null);
}, []);

const closeDeleteDialog = useCallback(() => {
setShowDeleteDialog(false);
setFileToDelete(null);
}, []);

const closeShareDialog = useCallback(() => {
setShowShareDialog(false);
setFileToShare(null);
}, []);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Rather than having all of these states; could have something like:

const [aciton, setAction] = useState<undefined | { file: string, action: 'share' | 'delete' | 'move' ... }>(undefined)

and manage this in a single state

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@jeswr this is done here

Comment on lines +48 to +58
const headers = new Headers(init?.headers);
headers.set(
"Cache-Control",
"no-cache, no-store, must-revalidate",
);
headers.set("Pragma", "no-cache");
return fetchFn(input, {
...init,
headers,
cache: "no-store",
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Servers should not be serving caching headers on mutable resources. I suspect we should be able to remove this code entirely. Please open an issue for this.

@PreciousOritsedere
PreciousOritsedere merged commit cb01319 into main Aug 19, 2026
2 checks passed
@PreciousOritsedere
PreciousOritsedere deleted the 42-sidebar-folder-tree branch August 19, 2026 11:24
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.

Show folder arborescence in the left hand sidebar

2 participants