Skip to content

fix(picker): Make custom picker backends selectable and persistent - #46

Merged
mhiro2 merged 2 commits into
mainfrom
fix/custom-picker-backend
Aug 27, 2026
Merged

fix(picker): Make custom picker backends selectable and persistent#46
mhiro2 merged 2 commits into
mainfrom
fix/custom-picker-backend

Conversation

@mhiro2

@mhiro2 mhiro2 commented Aug 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • register_picker() was documented as a public API but could never be used: picker.backend validation only accepted the four bundled names and setup() wiped the whole registry.
  • picker.backend now accepts any registered picker name, and user-registered pickers/providers survive setup() re-runs.
  • :checkhealth peekstack reports custom backends and warns when the configured backend is not registered.

Changes

  • 812252d : fix(picker): make custom picker backends selectable and persistent
    • Accept any non-empty string for picker.backend; unregistered names fall back to builtin at pick time
    • Split the registry into builtin and user layers so setup() resets only builtin entries and register_picker() / register_provider() registrations are kept and take precedence over same-named builtin entries
    • Document custom picker selection in README and doc/peekstack.txt, and add tests for config acceptance, registration before/after setup(), and dispatch to the custom picker
  • 9d22beb : fix(picker): validate falsy backend values and prefer user pickers in health
    • Warn and fall back to builtin for false or empty picker.backend values instead of keeping them
    • Report a user picker registered under a bundled name (e.g. telescope) as ok in :checkhealth, matching runtime precedence
    • Widen the PeekstackConfigPicker.backend type annotation to string

mhiro2 added 2 commits August 27, 2026 22:25
register_picker() was documented as a public API, but picker.backend
validation only accepted the four bundled names and setup() cleared the
whole registry, so a registered picker could never be selected and was
dropped on every setup() call.

- Accept any non-empty string for picker.backend; unregistered names fall
  back to builtin at pick time.
- Split the registry into builtin and user layers. setup() resets only the
  builtin layer, so register_picker()/register_provider() entries survive
  re-runs and take precedence over builtin entries.
- Report registered custom backends in :checkhealth and warn when the
  configured backend is not registered.
… health

- Validate picker.backend for every populated value, so false and empty
  strings fall back to builtin with a warning instead of being kept as-is.
- Report a user-registered picker as ok in :checkhealth even when it shares a
  bundled backend name, matching runtime precedence.
- Widen the PeekstackConfigPicker.backend type to string.
@mhiro2 mhiro2 self-assigned this Aug 27, 2026
@mhiro2 mhiro2 added the bug Something isn't working label Aug 27, 2026
@mhiro2
mhiro2 merged commit aeb92e5 into main Aug 27, 2026
3 checks passed
@mhiro2
mhiro2 deleted the fix/custom-picker-backend branch August 27, 2026 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant