mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2015] Custom tools saved with boolean enabled are hidden from selectors #987
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#987
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Xelvanis on GitHub (Jun 3, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2015
Originally assigned to: @Xelvanis on GitHub.
Problem
New refactor custom tools are saved with
enabled: trueas a boolean:src/engine/contracts/schemas/custom-tool.schema.tsdefaultsenabledtotrue.src/features/catalog/agents/components/ToolEditor.tsxsendsenabled: trueon save.src-tauri/src/commands/storage/contracts.rsonly marksparametersSchemaas typed JSON forcustom-tools, soenabledis not normalized to the legacy string shape.The selector helper filters custom tools with a string-only check:
src/features/catalog/agents/hooks/use-custom-tools.tstreats a tool as enabled only whentool.enabled === "true" || tool.enabled === "1".That means a newly saved static or webhook custom tool can be valid and executable in runtime, but hidden from the Chat Settings and Agent tool pickers because its
enabledvalue is booleantrueinstead of string"true".Evidence
A local module probe against the refactor branch returned:
Runtime paths already accept boolish enabled values:
src/engine/generation/tools-runtime.tsusesboolish(row.enabled, false).src-tauri/src/commands/storage/custom_tools.rsusesstring_bool(row.get("enabled"))and accepts booleans.Legacy stored custom-tool
enabledas a string throughpackages/server/src/services/storage/custom-tools.storage.ts, so the old UI string check matched the persisted shape.Expected behavior
Custom tool UI selection should accept both current refactor booleans and legacy string rows, or storage should normalize
custom-tools.enabledconsistently.Acceptance criteria
enabled: "true"orenabled: "1"remain selectable.false, string"false", or string"0"remain hidden.isCustomToolSelectablefor boolean and string enabled values.Context
Found during the Target 1 contracts-and-schemas batch-3 parityscan in #2011.