Skip to content

Conversation

aayushkdev
Copy link
Collaborator

@aayushkdev aayushkdev commented Jun 27, 2025

fix #1682

tree.webm

Summary/Goals of this change
The goal of this PR is to introduce a collapsible file tree panel in the left pane of the project resource view. This view allows users to explore the project's CodebaseResource in a more user friendly way.

  • Clicking the chevron next to a folder toggles a dropdown view of its immediate children in the tree (left pane).

    • If the children have already been fetched, they are simply shown or hidden without making another request.
    • Directories without any children are shown without a chevron and cannot be expanded.
    • This action only affects the left pane and does not update the right pane.
  • Clicking the folder name is intended to display the list of that folder’s children in the right pane. (Not yet implemented)

  • Clicking on a file is intended to show that individual file’s details or metadata in the right pane. (Not yet implemented)

Note: This pr depends on the parent_path field introduced in #1687. To ensure tests pass and the functionality works, I’ve temporarily duplicated the necessary parts of that change here. These changes will be removed once that pr is merged.

@aayushkdev aayushkdev force-pushed the 1682-left-pane-file-tree branch from 0ffbe25 to 6172941 Compare June 27, 2025 14:08
@aayushkdev aayushkdev requested review from tdruez, Copilot and AyanSinhaMahapatra and removed request for Copilot June 27, 2025 14:32
Copilot

This comment was marked as spam.

@aayushkdev
Copy link
Collaborator Author

Hey @AyanSinhaMahapatra @tdruez can I have a review of this pr

@aayushkdev aayushkdev force-pushed the 1682-left-pane-file-tree branch from 03842ca to 7b8ba33 Compare July 4, 2025 04:45
Copy link
Contributor

@tdruez tdruez left a comment

Choose a reason for hiding this comment

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

@aayushkdev Off to a good start, see my various comments for improvements.

The naming convention needs consistency:
resource_tree, file_tree, file_tree_panel, file-tree, CodebaseResourceTree, codebase_tree, Resource Tree
Let's use CodebaseResourceTree and resource_tree everywhere rather than "file...".

You can start the implementation of the left and right panels rendering.

@aayushkdev aayushkdev force-pushed the 1682-left-pane-file-tree branch from b1f8a7f to 3d1c4b7 Compare July 7, 2025 19:16
@aayushkdev
Copy link
Collaborator Author

Hey @tdruez could you review the changes and if possible review #1687 so we can get that merged as the further pr's require it and without that I have to keep adding parent_path value to each pr temporarily

Copy link
Contributor

@tdruez tdruez left a comment

Choose a reason for hiding this comment

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

See my comments for refinements.
Once done with those, you can continue the implementation of

Clicking the folder name is intended to display the list of that folder’s children in the right pane. (Not yet implemented)

Clicking on a file is intended to show that individual file’s details or metadata in the right pane. (Not yet implemented)

@aayushkdev aayushkdev requested a review from tdruez July 15, 2025 09:38
@tdruez tdruez changed the title add left-pane file tree view and related templates Add left-pane file tree view and related templates Jul 16, 2025
Copy link
Contributor

@tdruez tdruez left a comment

Choose a reason for hiding this comment

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

@aayushkdev The current code is fine, you can implement the missing parts before the next review round.

@aayushkdev aayushkdev force-pushed the 1682-left-pane-file-tree branch from e20208a to 154d1a6 Compare July 21, 2025 20:07
@tdruez
Copy link
Contributor

tdruez commented Jul 23, 2025

@aayushkdev What's the status on the right panel functionalities?

@aayushkdev
Copy link
Collaborator Author

@aayushkdev What's the status on the right panel functionalities?

I've completed the basic implementation of the right panel functionality and will create a PR soon. I was waiting for the previous PRs to be approved and merged first, so the Git history remains clean. This way, I won't need to temporarily include parts of the previous code just to make things work, only to remove them later before merging.

@tdruez
Copy link
Contributor

tdruez commented Jul 24, 2025

I was waiting for the previous PRs to be approved and merged first, so the Git history remains clean.

The commits are squashed as a single one when the PR is merged. You do not have to worry about the git history.
Also, merging the left panel without the right panel does not make sense, the right panel functionalities should be part of this PR.

@aayushkdev
Copy link
Collaborator Author

okayy sure I

I was waiting for the previous PRs to be approved and merged first, so the Git history remains clean.

The commits are squashed as a single one when the PR is merged. You do not have to worry about the git history. Also, merging the left panel without the right panel does not make sense, the right panel functionalities should be part of this PR.

ah okayy I was thinking about seperate prs for right and left pane but yeah that makes much more sense to do it in a single commit I will do a commit with the right pane soon

@tdruez
Copy link
Contributor

tdruez commented Jul 25, 2025

@aayushkdev #1691 and #1776 are now merged. You can merge main in this branch as well.

Signed-off-by: Aayush Kumar <aayush214.kumar@gmail.com>
Signed-off-by: Aayush Kumar <aayush214.kumar@gmail.com>
Signed-off-by: Aayush Kumar <aayush214.kumar@gmail.com>
Signed-off-by: Aayush Kumar <aayush214.kumar@gmail.com>
Signed-off-by: Aayush Kumar <aayush214.kumar@gmail.com>
Signed-off-by: Aayush Kumar <aayush214.kumar@gmail.com>
Signed-off-by: Aayush Kumar <aayush214.kumar@gmail.com>
Signed-off-by: Aayush Kumar <aayush214.kumar@gmail.com>
Signed-off-by: Aayush Kumar <aayush214.kumar@gmail.com>
Signed-off-by: Aayush Kumar <aayush214.kumar@gmail.com>
Signed-off-by: Aayush Kumar <aayush214.kumar@gmail.com>
Signed-off-by: Aayush Kumar <aayush214.kumar@gmail.com>
Signed-off-by: Aayush Kumar <aayush214.kumar@gmail.com>
Signed-off-by: Aayush Kumar <aayush214.kumar@gmail.com>
Signed-off-by: Aayush Kumar <aayush214.kumar@gmail.com>
@aayushkdev aayushkdev force-pushed the 1682-left-pane-file-tree branch from 154d1a6 to 633e5df Compare July 28, 2025 16:35
@aayushkdev
Copy link
Collaborator Author

aayushkdev commented Jul 28, 2025

Hey @tdruez I have pushed the right panel but some tests still fail even though all pass in my system I think it might be a issue with the CI/CD as the tests that fail are unrelated to my code

Screencast_20250728_224440.webm

Things that are currently left to do

  • implement search and filtering
  • implement optimisations + caching
  • polish the ui a bit more
  • Add any other suggested changes/features

Signed-off-by: Aayush Kumar <aayush214.kumar@gmail.com>
@tdruez
Copy link
Contributor

tdruez commented Aug 4, 2025

I think it might be a issue with the CI/CD as the tests that fail are unrelated to my code

@aayushkdev Could you merge the latest main branch here, the unrelated failire should now be fixed.
Also, what's the latest status here on your progress?

@aayushkdev
Copy link
Collaborator Author

For the past week I have been testing out different ways of filtering/searching and I will be making a commit for the filtering functionality soon

I think it might be a issue with the CI/CD as the tests that fail are unrelated to my code

@aayushkdev Could you merge the latest main branch here, the unrelated failire should now be fixed. Also, what's the latest status here on your progress?

@tdruez
Copy link
Contributor

tdruez commented Aug 14, 2025

@aayushkdev you haven't reported progress in a while, anything blocking you?

@aayushkdev
Copy link
Collaborator Author

@aayushkdev you haven't reported progress in a while, anything blocking you?

Currently I have my midsems exams going on thats why havent been that active.

I have added filtering support in my latest commit. but the search and filtering are taking time as I am trying to use the existing search/filtering components for adding these features and the existing component are not designed for htmx (display data without page reloads) so I am trying to adapt these components to support htmx for the codebase_tree view and make sure it still supports the other views which use these components.

@tdruez
Copy link
Contributor

tdruez commented Aug 18, 2025

. but the search and filtering are taking time as I am trying to use the existing search/filtering components for adding these features and the existing component are not designed for htmx (display data without page reloads) so I am trying to adapt these components to support htmx for the codebase_tree view and make sure it still supports the other views which use these components.

Ok, I'm suggesting that instead of doing too much here, we focus on having a clean, simple first PR that can be merged and used, and we add the search/filtering an more features in other PRs.

Copy link
Contributor

@tdruez tdruez left a comment

Choose a reason for hiding this comment

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

Please remove all the searching and filtering logic and let's have something that can be merged asap ;)

Comment on lines 529 to 530
("_EMPTY_", "None"),
("_ANY_", "Any"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Do not use the hardcoded values but the variable instead.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is related to the filters I'll keep this in mind in my next pr

Signed-off-by: Aayush Kumar <aayush214.kumar@gmail.com>
@aayushkdev aayushkdev force-pushed the 1682-left-pane-file-tree branch from f9d6325 to e665feb Compare August 19, 2025 18:16
@aayushkdev aayushkdev requested a review from tdruez August 20, 2025 16:08
@aayushkdev
Copy link
Collaborator Author

I think this branch should be ready to merge, it has the basic functionality of the resource tree.

Signed-off-by: Aayush Kumar <aayush214.kumar@gmail.com>
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.

Create a new View to return the immediate children of a path
2 participants