Skip to content

Expose internal imperative navigation API as a public API - #1020

Merged
SlexAxton merged 2 commits into
pierrecomputer:mainfrom
K-Mistele:main
Jul 23, 2026
Merged

Expose internal imperative navigation API as a public API#1020
SlexAxton merged 2 commits into
pierrecomputer:mainfrom
K-Mistele:main

Conversation

@K-Mistele

Copy link
Copy Markdown
Contributor

Description

Exposes the private imperative navigation API in Pierre's Trees library as a public API.

Motivation & Context

Pierre's Diffs library has a public imperative navigation API. This is very useful for building keyboard- and hotkey-first experiences on the Diff library.

While integrating the Trees library into HumanLayer, I noticed that unlike the Diffs library, the Trees library's imperative navigation API is internal/private.

This PR makes that private API Public.

Type of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality). You must have
    first discussed with the dev team and they should be aware that this PR is
    being opened
  • Breaking change (fix or feature that would change existing functionality).
    You must have first discussed with the dev team and they should be aware
    that this PR is being opened
  • Documentation update

Checklist

  • I have read the
    contributing guidelines
  • My code follows the code style of the project (moon run root:lint)
  • My code is formatted properly (moon run root:format)
  • I have updated the documentation accordingly (if applicable)
  • I have added tests to cover my changes (if applicable)
  • All new and existing tests pass (moonx diffs:test)

How was AI used in generating this PR

  1. Used HumanLayer (humanlayer.com) to conduct codebase research and identify the relevant parts of the codebase and APIs (artifact here]
  2. Created a concise design document that was shared with the Pierre team via slack to request feedback

-> received feedback from @SlexAxton

my first thought reading the goals section was that trees should likely just support this mode natively
but i also think the rest of the imperative stuff would likely end up useful anyways
so i'd be down for both

  1. Used HumanLayer to implement & test changes and to review the Contributing guide before opening an upstream PR (per the guide, this description has been written by hand by me)

Host controls can now move focus through the visible tree and inspect the
same row order that Trees renders. This keeps custom navigation in sync
with expansion, search, sorting, and flattened directories.

Forward the existing controller navigation and visible-row methods through
the public FileTree model, add direct model coverage, and document the API
for React and vanilla users.
@vercel

vercel Bot commented Jul 23, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
pierre-docs-diffs Ready Ready Preview Jul 23, 2026 6:35pm
pierre-docs-diffshub Ready Ready Preview Jul 23, 2026 6:35pm
pierre-docs-trees Ready Ready Preview Jul 23, 2026 6:35pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
pierrejs-diff-demo Skipped Skipped Jul 23, 2026 6:35pm

Request Review

@vercel
vercel Bot temporarily deployed to Preview – pierrejs-diff-demo July 23, 2026 18:24 Inactive
@vercel

vercel Bot commented Jul 23, 2026

Copy link
Copy Markdown

@K-Mistele is attempting to deploy a commit to the Pierre Computer Company Team on Vercel.

A member of the Team first needs to authorize it.

@SlexAxton SlexAxton left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Simple

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