I was trying to configure sidecar to only show specific plugin tabs. I set "enabled": false on git-status and file-browser in my config, but the tabs kept showing up regardless.
I had an AI agent dig into the sidecar source to figure out what was going on. Here's what it found:
The config parsing works — git-status.enabled is read into GitStatusPluginConfig.Enabled in internal/config/loader.go. But that value is never used. In cmd/sidecar/main.go, all plugins are registered unconditionally, no enabled check anywhere.
file-browser doesn't even have an Enabled field in its config struct — there's no FileBrowserPluginConfig at all, so setting "file-browser": { "enabled": false } is silently ignored.
The only plugin with any kind of gate is notes, via a notes_plugin feature flag (default off).
Neither internal/plugins/gitstatus/plugin.go nor internal/plugins/filebrowser/plugin.go check any enabled field in their Init() methods either, so there's no way to disable them at the plugin level.
What I'd expect
Setting "enabled": false on a plugin in config should stop that tab from appearing.
Possible fix
Wrap each registration in main.go with an enabled check, and add an Enabled field to the file-browser config struct:
if cfg.Plugins.GitStatus.Enabled {
registry.Register(gitstatus.New())
}
if cfg.Plugins.FileBrowser.Enabled {
registry.Register(filebrowser.New())
}
No workaround available short of patching the binary.
I was trying to configure sidecar to only show specific plugin tabs. I set
"enabled": falseongit-statusandfile-browserin my config, but the tabs kept showing up regardless.I had an AI agent dig into the sidecar source to figure out what was going on. Here's what it found:
The config parsing works —
git-status.enabledis read intoGitStatusPluginConfig.Enabledininternal/config/loader.go. But that value is never used. Incmd/sidecar/main.go, all plugins are registered unconditionally, no enabled check anywhere.file-browserdoesn't even have anEnabledfield in its config struct — there's noFileBrowserPluginConfigat all, so setting"file-browser": { "enabled": false }is silently ignored.The only plugin with any kind of gate is
notes, via anotes_pluginfeature flag (default off).Neither
internal/plugins/gitstatus/plugin.gonorinternal/plugins/filebrowser/plugin.gocheck any enabled field in theirInit()methods either, so there's no way to disable them at the plugin level.What I'd expect
Setting
"enabled": falseon a plugin in config should stop that tab from appearing.Possible fix
Wrap each registration in
main.gowith an enabled check, and add anEnabledfield to the file-browser config struct:No workaround available short of patching the binary.