The `tree_source` example is problematic
- Dominant language
- Python
- Stars
- 5.4k
- Forks
- 827
- Avg merge
- 15h 39m
- Merged PRs (30d)
- 40
Description
### Describe the bug
The `tree_source` example creates a lazy-loading tree view of the current directory.
1) When used with Briefcase (`dev` or `run`), the `cwd` is `$HOME`.....the app loaded 10GB in to memory before i killed it
2) It doesn't seem to actually be lazy.....it tried to read my entire home directory before showing the window
3) It completely bombs out on a node if anything causes an `OSError`...for instance, a broken symlink in my home dir
### Steps to reproduce
Run `briefcase dev` for the `tree_source` example
### Expected behavior
The directory used for the tree is enforced to be the directory of the app and it is actually lazy.
### Screenshots
_No response_
### Environment
- Operating System: pop os 22.04
- Python version: 3.10.12
- Software versions:
- Briefcase: `0.3.15.dev361+g02f412be.d20230619`
- Toga: `0.3.2.dev383+g7d68e74d.d20230619`
### Logs
_No response_
### Additional context
_No response_
Contributor guide
Research direction
Start with the `tree_source` example and reproduce it with `briefcase dev`, checking how it chooses the directory, loads children, and handles `OSError`. Done means the example stays scoped to the app directory, loads directory contents lazily, and does not fail when a node raises an `OSError`.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100