Skip to content

feat: show default session notes persistently#15

Merged
ushmz merged 5 commits into
mainfrom
feat/show-default-notes-always
Mar 29, 2026
Merged

feat: show default session notes persistently#15
ushmz merged 5 commits into
mainfrom
feat/show-default-notes-always

Conversation

@ushmz

@ushmz ushmz commented Dec 13, 2025

Copy link
Copy Markdown
Owner

Summary

Added show_default_notes configuration option to display default session notes persistently in the background when no named session or retrace mode is active.

Key features:

  • Default session notes are always visible when working without an explicit session
  • Automatically hidden when starting a named session or entering retrace mode
  • Automatically restored when ending a session or exiting retrace mode
  • Configurable via show_default_notes option (default: true)

Changes

Configuration

  • lua/tabi/config.lua: Added show_default_notes option (default: true)

Core Implementation

  • lua/tabi/init.lua:
    • Added _setup_default_session_display() to setup background display
    • Added _clear_default_session_display() to cleanup autocmds
    • VimEnter autocmd to initialize display on startup

Integration

  • plugin/tabi.lua:

    • Session start: Clear default display
    • Session end: Restore default display
  • lua/tabi/retrace.lua:

    • Retrace start: Clear default display
    • Retrace end: Restore default display

Tests

  • test/tabi/config_spec.lua: Config tests (3 cases)
  • test/tabi/integration/default_session_display_spec.lua: Comprehensive integration tests (16 cases)
    • Startup behavior
    • Session lifecycle integration
    • Retrace mode integration
    • Autocmd management
    • Complex scenarios

Behavior

When show_default_notes: true (default):

Startup → Show default session notes
↓
Start named session → Hide default, show session notes
↓
End session → Restore default notes
↓
Start retrace → Hide default, show retrace notes
↓
End retrace → Restore default notes

When show_default_notes: false:

  • No background display of default session
  • Traditional behavior (only show notes in active sessions)

Test plan

  • All 386 tests pass (364 existing + 22 new)
  • luacheck and stylua checks pass
  • Config option works correctly
  • Display toggles properly on session/retrace start/end
  • Autocmds are properly managed (no leaks)
  • Feature can be disabled via config

Added configuration option to control whether default session notes
are always displayed in the background when no named session or
retrace mode is active.

Default: true (enabled)
Added functionality to display default session notes in the background
when no named session or retrace mode is active.

- Setup default session display on VimEnter
- Auto-update display when entering buffers
- Only show when no active session or retrace mode
- Helper functions to setup and clear display autocmds
Modified session start/end commands to properly manage default
session display:

- Clear default session notes when starting a named session
- Restore default session display when ending a session
- Only applies when show_default_notes config is enabled
Modified retrace start/stop to properly manage default session display:

- Clear default session notes when entering retrace mode
- Restore default session display when exiting retrace mode
- Only applies when show_default_notes config is enabled
Added 19 new test cases covering:

Config tests (test/tabi/config_spec.lua):
- Verify show_default_notes defaults to true
- Test configuration override

Integration tests (test/tabi/integration/default_session_display_spec.lua):
- Startup behavior with/without default session
- Session start/end integration
- Retrace mode integration
- Autocmd lifecycle management
- Complex scenarios and edge cases

Also fixed _setup_default_session_display() to check config before
executing, preventing unnecessary work when feature is disabled.

All 386 tests pass.
@ushmz ushmz merged commit ba532aa into main Mar 29, 2026
4 checks passed
@ushmz ushmz deleted the feat/show-default-notes-always branch March 29, 2026 04:28
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