Remove dead always-true runnable action field

runnable was hardcoded true on every action,
and only loaded+enabled capabilities ever
reach the registry, so every JS === false
branch was unreachable. Drop the field, its
JSON, the guards, and the orphan .disabled
CSS rule.
This commit is contained in:
Andrew
2026-07-10 17:12:52 +08:00
parent 73a1913447
commit 7c9fa801fb
4 changed files with 14 additions and 20 deletions

View File

@@ -91,7 +91,6 @@ bool ActionRegistry::make_action(const std::string& plugin_key, const std::strin
out.pkg = package_name_for(plugin_key);
out.plugin_key = plugin_key;
out.capability = capability;
out.runnable = true;
seed_state(out);
return true;
}
@@ -295,7 +294,6 @@ nlohmann::json ActionRegistry::snapshot() const
actions.push_back({{"id", a->id},
{"title", a->title},
{"pkg", a->pkg},
{"runnable", a->runnable},
{"shortcut", ""}});
// why: favourites is the ORDERED pin list - it must come from favourite_actions
// as stored, not be re-derived from the frecency-sorted actions (that would

View File

@@ -26,7 +26,6 @@ struct AppAction
std::string pkg; // owning package display name (row eyebrow)
std::string plugin_key; // weak handle: owning package
std::string capability; // weak handle: capability name
bool runnable = true;
// seeded from AppConfig for the snapshot / sort:
bool favourite = false;