Skip to content

[Enhancement] Allow individual ring entries to be pinned and protected from eviction [Reopen: #33] #72

Description

@shaaravraghu

NEW CONTRIBUTORS FIRST PREFERENCE.

Description
When the dynamic ring reaches its capacity, the oldest entry is evicted to make room for new ones. Entries that the user considers important have no protection against this eviction. A pin mechanism should allow the user to mark specific entries as permanent so they are never removed regardless of ring activity or capacity limits.

Steps to Reproduce

  1. Fill the dynamic ring to its maximum capacity.
  2. Copy a new entry and observe that the oldest entry is evicted.
  3. Note that there is no way to protect a specific entry from being removed.

Expected Behavior
A user should be able to pin any entry in the ring. Pinned entries should be excluded from eviction when the ring reaches capacity and should persist across daemon restarts until explicitly unpinned or deleted by the user.

Actual Behavior
All entries are treated equally. Any entry can be evicted when capacity is reached, with no way to protect important entries.

Example
A user pins a frequently reused code snippet to the ring. Even after dozens of subsequent copy operations fill the ring, the pinned entry remains accessible without the user needing to re-copy it.

Suggested Fix
Add a pinned boolean field to the entry metadata. Modify the eviction logic to skip pinned entries when selecting which entry to remove. Expose a CLI command or chord to toggle the pinned state of the entry at the current cursor position.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions