Skip to content

config: migrate autosuggestion + make config show registry-aware#360

Merged
berrym merged 3 commits into
masterfrom
config/migrate-autosuggestion
Jun 25, 2026
Merged

config: migrate autosuggestion + make config show registry-aware#360
berrym merged 3 commits into
masterfrom
config/migrate-autosuggestion

Conversation

@berrym

@berrym berrym commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Summary

The second strangler step of the configuration nervous system, plus the discoverability fix the migrations require.

Migrate the autosuggestion section (commit 1)

The four autosuggestion.* enum keys (dismiss_policy, rank, partial_accept, sources) move onto the registry binding + layer model proven on history.*: bound to their config.autosuggestion_* enum cells via declarative creg_enum_pair_t tables; autosuggestion_sync_to/from_runtime and their strcmp ladders deleted; removed from the legacy config_options[] table; dead config_enum_def tables dropped; section hooks NULL. config set lands in SESSION (survives a mode switch); config explain shows the layered provenance.

Keep config show complete (commits 2-3)

As a section migrates off the legacy table, its keys would vanish from config show (which iterated only that table) — a discoverability regression for a shell whose config system is meant to be its most discoverable feature. config_show_section now also enumerates the matching registry section and prints the migrated keys with their effective values + descriptions, deduped against legacy. Also adds the [autosuggestion] section to config show, which was never emitted at all.

Verification

  • meson test: 156/156, zero warnings.
  • config show lists the migrated history.* and the new [autosuggestion] keys with values + help; config explain shows the provenance stack; round-trips through the binding.

Continues toward retiring the legacy config_options[] table per docs/development/CONFIG_NERVOUS_SYSTEM.md.

🤖 Generated with Claude Code

berrym added 3 commits June 25, 2026 16:55
Convert the four autosuggestion.* enum keys (dismiss_policy, rank,
partial_accept, sources) to the registry binding + layer model -- the same
strangler step proven on history.*. Bind each to its config.autosuggestion_*
enum cell via a declarative creg_enum_pair_t table, delete
autosuggestion_sync_to_runtime and autosuggestion_sync_from_runtime (and their
strcmp ladders), remove the keys from the legacy config_options[] table, drop the
now-dead config_enum_def tables, and NULL the section's sync hooks.

The keys now resolve through the registry: config set lands in the SESSION layer
(survives a mode switch) and config explain shows the layered provenance. Full
suite green.
…rable

As a section migrates off the legacy config_options[] table, its keys would
vanish from `config show` (which iterates only that table) -- a discoverability
regression for a shell whose configuration system is meant to be its most
discoverable feature. After the legacy keys, config_show_section now enumerates
the matching CREG registry section and prints the keys the legacy loop did not
(the migrated ones) with their effective values and descriptions, deduped
against the legacy table. history.* and autosuggestion.* are visible again.
config_show_all never emitted the [autosuggestion] section, so its keys were
invisible in config show even before the migration. Add it alongside the other
sections; with the registry-aware section printer the four autosuggestion keys
now appear with their effective values.
@berrym berrym changed the title config: migrate the autosuggestion section to bindings + layers config: migrate autosuggestion + make config show registry-aware Jun 25, 2026
@berrym berrym merged commit eb0ea36 into master Jun 25, 2026
4 checks passed
@berrym berrym deleted the config/migrate-autosuggestion branch June 25, 2026 21:18
@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 15.38462% with 33 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/config.c 15.38% 33 Missing ⚠️

📢 Thoughts on this report? Let us know!

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