Skip to content

feat: persist TOC open/closed state per file in localStorage#143

Merged
k1LoW merged 5 commits intomainfrom
feat/persist-toc-state
Mar 26, 2026
Merged

feat: persist TOC open/closed state per file in localStorage#143
k1LoW merged 5 commits intomainfrom
feat/persist-toc-state

Conversation

@k1LoW
Copy link
Copy Markdown
Owner

@k1LoW k1LoW commented Mar 26, 2026

Summary

  • Save and restore TOC panel open/closed state per file in localStorage (key: mo-toc-open)
  • Non-markdown files always have ToC closed regardless of stored state
  • Remove the auto-close useEffect in favor of derived state

Closes #138

@k1LoW k1LoW self-assigned this Mar 26, 2026
@k1LoW k1LoW added the enhancement New feature or request label Mar 26, 2026
@github-actions

This comment has been minimized.

This comment was marked as outdated.

@github-actions

This comment has been minimized.

This comment was marked as outdated.

@github-actions
Copy link
Copy Markdown
Contributor

Code Metrics Report

main (aaeae71) #143 (b7b3d66) +/-
Coverage 57.2% 57.2% 0.0%
Code to Test Ratio 1:0.5 1:0.5 +0.0
Test Execution Time 29s 30s +1s
Details
  |                     | main (aaeae71) | #143 (b7b3d66) | +/-  |
  |---------------------|----------------|----------------|------|
  | Coverage            |          57.2% |          57.2% | 0.0% |
  |   Files             |             39 |             39 |    0 |
  |   Lines             |           3272 |           3272 |    0 |
  |   Covered           |           1873 |           1873 |    0 |
+ | Code to Test Ratio  |          1:0.5 |          1:0.5 | +0.0 |
  |   Code              |           5085 |           5117 |  +32 |
+ |   Test              |           2846 |           2888 |  +42 |
- | Test Execution Time |            29s |            30s |  +1s |

Reported by octocov

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

@k1LoW k1LoW merged commit 5d758a9 into main Mar 26, 2026
7 checks passed
@k1LoW k1LoW deleted the feat/persist-toc-state branch March 26, 2026 09:00
@github-actions github-actions bot mentioned this pull request Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request tagpr:minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: Remember TOC sidebar open/closed state

2 participants