Skip to content

Calendar panel state is not preserved after visiting periodic notes #502

Closed

Description

@uNyanda
  • Date: 2026-07-28
  • Type: Bug
  • Severity: Minor

Environment

  • OS: Linux
  • WM: Niri
  • Compositor: Wayland
  • Software version: 2.19.0

Description

The Calendar panel correctly opens automatically when viewing a periodic note (such as daily, weekly, or monthly note).

However, after returning to a non-periodic note, the Calendar panel is also restored as open, even if it had previously been closed in that note.

The Calendar panel state is preserved correctly when switching between non-periodic notes. The issue only occurs after visiting a periodic note.

Steps to reproduce

  1. Open a non-periodic note.
  2. Close the Calendar panel with Leader+C.
  3. Switch to another non-periodic note.
  4. Switch back to the first note and verify that the Calendar panel remains closed.
  5. Open a periodic note (e.g., a daily note).
  6. Observe that the Calendar panel opens automatically.
  7. Return to the original non-periodic note.

Expected Behaviour

Opening a periodic note should not change the previously saved Calendar panel state for other notes.

When returning to a non-periodic note, the Calendar panel should remain in its previous state (closed).

Actual Behaviour

After visiting a periodic note, the Calendar panel is restored as open in non-periodic notes, even if it had previously been closed.

Additional Notes

This does not appear to affect navigation between non-periodic notes. Their Calendar panel state is preserved correctly until a periodic note is opened.

The automatic opening of the Calendar panel for periodic notes appears to be intentional. The issue is that this state is then carried over to unrelated notes.

Activity

  1. adibhanna commented on Jul 29, 2026

    @adibhanna
    Contributor

    Fixed for 2.20.0, on the release branch as 8620ea2.

    Root cause: the Calendar panel is one sticky per-pane flag, deliberately, so it stays as you set it while you browse. The auto-open for periodic notes wrote into that same flag with nothing marking who opened it, so one visit to a daily note converted into "open on every note" and quietly undid the close you had made elsewhere. Your read of it was exactly right: the auto-open is intentional, and it was the carry-over that was the bug.

    The fix gives the open a provenance bit. A panel the app opened for a periodic note closes itself when you leave the periodic notes; a panel you opened yourself keeps the sticky behaviour; closing an auto-opened panel by hand sticks; re-opening it by hand makes it yours and it then survives visits either way.

    Your numbered repro is pinned as a unit test, and the built app was driven through the same seven steps end to end: the panel now auto-opens on the daily note and is closed again on the way back. Thanks for another report precise enough to encode directly into a test.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions