Skip to content

feat: add read-only project file explorer and preview - #37

Merged
nonlooped merged 3 commits into
mainfrom
feat/file-explorer-preview
Jul 31, 2026
Merged

feat: add read-only project file explorer and preview#37
nonlooped merged 3 commits into
mainfrom
feat/file-explorer-preview

Conversation

@nonlooped

Copy link
Copy Markdown
Owner

Summary

  • Adds a Files tab to the context pane: a lazy-expanding project tree (reusing the existing gitignore-aware file list), with git-state badges and Recent/Frequent quick-access sections.
  • Selecting a file swaps in a read-only preview: breadcrumbs, size/modified metadata, git-state badge, syntax-highlighted code and rendered Markdown (via the existing Streamdown/@streamdown/code pipeline), and image previews.
  • "Open in editor" and "Reveal in Explorer" reuse the existing editor-launch IPC; right-click still offers the existing file context menu.
  • Recent/frequent file access is tracked per project in NativePi's own persisted state (not Pi's), alongside the existing pinned-project/chat data.

Scope notes

  • Read-only by design: no editing, no new agent tools, nothing that reaches Pi's agent loop or model output — this only reads local files and existing Git/editor IPC NativePi already had.
  • No new directory-listing IPC was needed: the file tree is built client-side from the existing listProjectFiles (git ls-files-based, already gitignore-aware).

Test plan

  • bun run typecheck
  • bun run build
  • bun test (152 pass)
  • Manual run in the dev app — not done, per AGENTS.md's rule against starting a long-lived dev server; would need manual verification by a maintainer (open a project, switch to the Files tab, expand folders, preview a text/markdown/image file, use Open in editor / Reveal in Explorer).

@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
nativepi Ignored Ignored Preview Jul 31, 2026 10:20am

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 390e8431a3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/desktop/src/main/ipc.ts Outdated
Comment thread apps/desktop/src/main/files.ts
Comment thread apps/desktop/src/renderer/components/FileTree.tsx Outdated
Comment thread apps/desktop/src/renderer/components/FileTree.tsx Outdated
Comment thread apps/desktop/src/renderer/components/FileTree.tsx Outdated
Comment thread apps/desktop/src/main/files.ts Outdated
@nonlooped
nonlooped merged commit eed894b into main Jul 31, 2026
6 of 7 checks passed
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.

1 participant