posit-dev / posit-dev/publisher

Project Files checkbox can be inaccurate when collapsing and expanding directories

Open
#2,467 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
16
Forks
7
Avg merge
3d 16h
Merged PRs (30d)
31

Description

If the Files API takes awhile due to a very large directory size, and the user clicks a checkbox to include/exclude a item; the checkbox could be inaccurate when the parent directory is then collapsed and re-expanded.

This is due to the item being removed then re-added to the DOM upon collapsing and expanding. We do not store a local state of included/excluded files and instead rely on the API response. This reliance also explains why including/excluding a directory does not change nested files until we hear back from the Files API.

Ideally the expanded state of a directory shouldn't affect the checkbox state prior to the hearing back from the Files API.

This issue does not include handling nested files when a directory is included in the deployment.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the Files API-backed Project Files checkbox and the directory collapse/expand path. Reproduce the delayed-response case with a large directory, then verify that collapsing and re-expanding preserves the user's include/exclude choice before the API responds. Keep nested-file handling out of scope, as stated in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.