Skip to content

[Feature] #14

Closed
Closed

Description

@eddy-seager

Problem Statement

Toggleable file tree / side panel
When reading a single markdown document, I would like to hide the file tree and use the full terminal width for content. The file tree is useful for navigation, but often not needed continuously.

Proposed Solution

Have a keyboard shortcut to hide it (I don't want to prescribe)

Alternatives Considered

Can't think of any

Scope

Which component does this affect?

  • [x ] markdown-reader TUI
  • mermaid-text library / CLI
  • Both / general

Additional Context

Activity

  1. added
    enhancement
    on Jun 8, 2026
  2. leboiko commented on Jun 8, 2026

    @leboiko
    Owner

    Good news — this already exists! Press Shift+H (capital H) to hide the file tree and give the viewer the full terminal width; press it again to bring the tree back. You can also use [ / ] to shrink/grow the tree without fully hiding it.

    It's listed in the in-app help (?) and in the README keybindings table. I'll leave this open in case the behavior isn't quite what you had in mind — let me know how it works for you!

  3. msgongora commented on Jun 10, 2026

    @msgongora
    Contributor

    Hi @leboiko thank you for making OSS this solution. I found it this morning, and after the evaluation, I liked it and decided to add a feature I needed. I was ready to file an issue, but since this is related, I'm just posting it here.

    The Feature: Add a setting to start with the file tree hidden while keeping H available to toggle it during the session.
    Here are the changes and happy to file the PR.

  4. leboiko commented on Jun 10, 2026

    @leboiko
    Owner

    This is great, @msgongora — thank you for digging in and prototyping it! Yes, please open the PR. 🙌

    I took a look at your feat/show_file_tree branch and really like the approach: the show_file_tree config default keeps things backward-compatible, the lazy ensure_tree_discovered() path is a nice perf touch for the hidden-tree case, and keeping the persisted startup preference (show_file_tree) separate from the live session state (tree_hidden) is exactly the right model.

    A couple of things I'll want to work through together during review (no need to fix before opening — let's track them on the PR):

    1. Behavioral test coverage. The serde round-trip tests are good, but the interesting logic — lazy discovery, initial focus when hidden, the settings-popup cursor offsets, and the H-after-hidden path — isn't covered yet. I'd like to add tests there.
    2. Settings popup state sync. The "Show file tree" bullet reflects show_file_tree, so if you start visible, press H to hide, then open settings, it still reads as ON. Minor, but worth either a label tweak ("Show file tree at launch") or syncing the displayed state.

    Open it against master and I'll run it through review. Thanks again for contributing!

  5. added a commit that references this issue on Aug 5, 2026
    eac0592
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions