Skip to content

3.3 Build explorer #29

Description

@goofmint

Part of Phase 3 — Directory workflow (tasks.md Task 3.3).

Summary

Build the file explorer: tree view, file operations, and .gitignore-aware visibility.

Details

  • Tree view using the tecode.ui Tree component over workspace.fs.readdir + watch (live refresh on external changes).
  • Open file on enter; create/rename/delete via showInputBox prompts with error surfacing; delete confirms first.
  • .gitignore visibility: check git availability once (Bun.spawn(["git","--version"])); if present, batch git check-ignore --stdin per directory; otherwise a minimal .gitignore glob matcher (*, **, / anchors, ! negation, trailing-/ dirs).
  • explorer.showHidden setting bypasses ignore logic and dotfile hiding; live-updates on config change.
  • explorerFocus context key; ctrl+shift+e focuses the view (activity-bar registration per Req 6.2).
  • Expose the ignore-aware walk as the shared utility consumed by ctrl+p (Task 3.2).

Completion requirements

  • Glob matcher test suite (anchors, **, negation, directory patterns)
  • git/no-git switch covered (spawn stubbed both ways)
  • Tree create/rename/delete verified against a temp directory, incl. error paths (existing name, permission denied)
  • watch-driven refresh on external file creation
  • explorer.showHidden toggle reflects without restart
  • bun test and lint pass

References

  • requirements.md: Req 11.2
  • design.md: §13

Dependencies

Blocked by: 3.1 (#27) for prompts; tree rendering only needs Phase 1 (#16).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions