Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Bug: [Trees] collapsed/flattened folders ignore gitignore markup

Open
#635 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
typescript
Domain
frontend

Research direction

Start by reproducing the issue with the provided tree, gitStatus entry for src-tauri/gen/, and flattenEmptyDirectories: true. Trace how flattened rows determine their paths and how ignored status is inherited; the report points to missing flattened intermediate paths. Done looks like the flattened row renders as ignored, with a test covering this reproduction.

Written by the indexing model from the issue text.

Description

bug trees
Prerequisites
Describe the issue

In the image below, src-tauri/gen is gitignored

Image

but it's rendered at full opacity

AI Analysis

For flattened rows, Pierre uses the deepest segment's path as the row identity, but gitStatusByPath and the ignored-inheritance fallback only consult that one path plus the visible ancestors — never the flattened intermediates. So if src-tauri/gen/ is in ignoredDirectoryPaths and Pierre flattens it with its single child src-tauri/gen/schemas/, the rendered row is "stamped" as src-tauri/gen/schemas/ with ancestorPaths = ["src-tauri/"], and nothing in that lookup chain knows about src-tauri/gen/.

Reproduction

Create a tree:

src-tauri/
  gen/
    schemas/
      foo.json

with:

gitStatus: [{ path: 'src-tauri/gen/', status: 'ignored' }]

and

flattenEmptyDirectories: true

=> the row renders at full opacity instead of ignored

What browser(s) are you seeing the problem on?

No response

What version of @pierre/diffs are you using?

1.0.0-beta.3 [trees, not diff]

Dominant language
TypeScript
Stars
6.2k
Forks
226
Avg merge
1d 12h
Merged PRs (30d)
34

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from pierrecomputer/pierre

All issues in pierrecomputer/pierre

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.