Skip to content

Add path-only recent projects provider - #53

Closed
LivioGama wants to merge 3 commits into
fdussert:mainfrom
LivioGama:codex/recent-projects-core-delivery
Closed

LivioGama wants to merge 3 commits into
fdussert:mainfrom
LivioGama:codex/recent-projects-core-delivery

Conversation

@LivioGama

Copy link
Copy Markdown
Contributor

What this changes

Adds a path-only recent-projects provider that remembers up to 50 canonical working directories reported by Herdr panes. It opens a selected folder in a new no-focus pane and uses the split response's pane ID so concurrent opens target their own panes.

How to see it

Subscribe to recent-projects and send recent-projects.open from a loopback command. Native managed-Herdr-pane acceptance remains unverified; this PR does not claim that runtime check.

Checks

  • Focused provider suite: 9/9 passed in a fresh local run.
  • Full server suite: 1,609 passed, 1 skipped; TypeScript native-preview check passed (package verification receipt).
  • git diff --check passed.
  • A separate combined app check had one 5-second timeout in the existing foreign-favicon protective-header test. The isolated retry could not load in this checkout because Fastify is not installed; the app route is not changed here.

@fdussert

Copy link
Copy Markdown
Owner

Thanks Livio! A few things before this can land:

  1. herdr is run by bare name. Every program the server runs is called by absolute path, with /usr/bin:/bin:/usr/sbin:/sbin first in PATH (AGENTS.md, Security invariants): a bare name resolves through Homebrew's folder, which isn't ours to trust. Since Herdr is a third-party tool, the provider needs to find it at a known location (or a path the user sets in the admin) and fail with unconfigured otherwise.
  2. The custom target means a widget command ends up starting a command of the user's choosing. Commands that act on the Mac take their target from a closed list; please drop custom (and check that claude/codex are resolved the same way as point 1).
  3. Housekeeping: rebase onto current main (v0.5.0 is out; providers are registered in registerRealProviders() now and need a demo fake), and please run pnpm typecheck, pnpm test and pnpm e2e there, as the checks in the description come from another runner. The CHANGELOG line is welcome, but should describe only what this PR does.

LivioGama and others added 3 commits October 19, 2026 22:35
Remember canonical working directories reported by Herdr panes and open a selected folder in a new pane. Use the split response pane ID so concurrent opens target their own panes.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Run the validated target directory through safePath with the inherited PATH, so the policy-protected system directories remain first while the validated executable still outranks shadow copies elsewhere. Cover the production PATH and executable lookup with synthetic fixtures.

Co-Authored-By: Claude <noreply@anthropic.com>
@LivioGama
LivioGama force-pushed the codex/recent-projects-core-delivery branch from 23c9fbf to e5623eb Compare October 19, 2026 21:09
@LivioGama

Copy link
Copy Markdown
Contributor Author

Update for maintainer comment 6272188620

  • Executable resolution: The provider now resolves Herdr, Claude Code and Codex to configured or known absolute executable paths and invokes Herdr by its absolute path. Claude and Codex use the same resolver and a validated target directory. The latest correction, e5623eb1085f578ce9fe9352ac58181b19b2da01, feeds that directory through safePath, preserving /usr/bin:/bin:/usr/sbin:/sbin first while keeping the validated target ahead of inherited non-system shadow directories. The regression test verifies PATH ordering and runs execFile against synthetic claude fixtures.
  • Custom target: The custom target remains in the request shape for compatibility, but returns custom-target-unsupported before pane creation. It remains fail-closed; there is no shell or bare-PATH fallback. Removing custom would remove the user-requested workflow to open projects in a custom editor or tool. I have therefore left its request shape intact rather than deleting the capability; this bounded correction still leaves launch unsupported and fail-closed, so the requested workflow is incomplete.
  • Rebase and integration: The branch is based on 6eaf545bdd9d8a3b3478a45f78446723277587c8; provider registration is in registerRealProviders(), with the demo fake and PR-scoped changelog entry.
  • Validation at final head e5623eb1085f578ce9fe9352ac58181b19b2da01: the focused provider tests pass 12/12; server and test-project TypeScript native-preview checks pass; git diff --check passes. The earlier full server suite result of 2,688 passed and 2 skipped was run on prior head 3606794b125243f9f520d472390a3c51e7b5f9d3, not this final head. E2E was not run on this final corrective head because the repository harness uses Playwright and this task excluded browser automation. Real Herdr, Claude Code and Codex pane launches remain UNVERIFIED.

The pull request remains a draft. The custom-target workflow and native launch acceptance are still open.

@fdussert

Copy link
Copy Markdown
Owner

Thanks Livio, and sorry for the long silence on this one. Your PR made us think about the feature more broadly: a "recent projects" tile is useful to everyone, not only to Herdr users, so we tried a generic version where Herdr is one source among others. It's up as a draft in #59.

What it does:

  • One provider with pluggable sources, each switched on per tile: git folders under roots you pick, Claude Code, Codex, VS Code, Cursor, JetBrains, zoxide, tmux and Herdr.
  • A built-in widget: tap opens the project, long-press offers the installed apps (Finder, terminals, editors, JetBrains IDEs), and a project can keep its own app or get one suggested from its files.
  • Herdr: it reuses the pane already open on that folder before splitting a new one, and can start Claude Code or Codex in a new pane (tmux too).
  • The rules your version ran into are handled there: every CLI by absolute path, targets from a closed list, local-only commands, and paths kept away from diagnostics and shared layouts.

So I'd suggest closing this PR and fdussert/fremkit-sietch#20 in favour of the draft. The Herdr side is the part you know best: a review there, or commits on top (anything we missed, a better way to find the pane), would be very welcome. Either way you're credited as co-author of the provider and in the app's credits, since the idea is yours.

@LivioGama LivioGama closed this Oct 21, 2026
mcouzinet pushed a commit to mcouzinet/fremkit that referenced this pull request Nov 5, 2026
The recent-projects widget started as LivioGama's Herdr provider (fdussert#53).
This branch replaces that pull request with a generic version, so their
first contribution lands through it rather than through a merge of their
own: add them to the credits the About pane and the README list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

2 participants