[DAS-Dashboard #1202] Updated configuration page to add new agent parameters. - #304
Conversation
… request parameters"
…meters to "Agents"
…oad bug that was cleaning the file when having an error
WalkthroughThe CLI now validates configuration load failures and populates schema defaults. Dashboard configuration adds attention-focus strictness and command-router HTTP API settings, supports JSON export text, and improves endpoint handling. Integration helpers handle configuration paths backed by directories. ChangesConfiguration loading and normalization
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant ConfigurationPage
participant AgentsBuilder
participant PathUtils
participant ConfigServices
ConfigurationPage->>AgentsBuilder: build command-router configuration
AgentsBuilder->>PathUtils: replace endpoint port
PathUtils-->>AgentsBuilder: HTTP API endpoint
AgentsBuilder->>ConfigServices: save nested configuration
ConfigServices-->>ConfigurationPage: return serialized content_text
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 6
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@das-cli/src/commands/config/config_cli.py`:
- Around line 78-89: Add regression cases in
das-cli/tests/integration/test_config.bats for config set --file covering
invalid JSON, non-object JSON roots, malformed UTF-8, and empty files. Each case
must assert a non-zero exit status and verify that both the configuration bytes
and the selected path remain unchanged.
In `@das-cli/src/commands/config/config_sections/normalize_file.py`:
- Around line 63-83: Update _defaults_for_config to use the core default AtomDB
type when content["atomdb"]["type"] is absent, so pruning matches the type later
applied by _fill_missing_values(). Mirror Settings._build_expected_schema()’s
adapterdb backend pruning rules, removing irrelevant backend defaults while
retaining only those for the effective backend. Add normalization coverage for a
missing atomdb.type and for each supported adapterdb backend type.
In `@das-cli/src/common/config/store.py`:
- Around line 121-140: Update the configuration loading logic in rewind() to
catch UnicodeDecodeError from json.load(), set _content to an empty dictionary,
and populate _load_error with the caught exception, matching the existing
FileNotFoundError, JSONDecodeError, and OSError handling.
In `@das-cli/src/settings/config.py`:
- Line 54: Update the DAS_IMAGE_VERSION configuration to an existing published
trueagi/das image tag for this release path, and add or update coverage
verifying the selected version tag so default container pulls resolve
successfully.
In `@das-dashboard/backend/shared/builders/agents_builder.py`:
- Around line 196-210: Update _build_command_router to parse agent["endpoint"]
with the existing IPv6-aware split_endpoint approach used by NestedConfigMapper,
then construct http_api_endpoint from the parsed host and http_api_port. Remove
the split-on-first-colon logic so bracketed IPv6 endpoints such as [::1]:40008
retain the complete host.
In `@das-dashboard/src/components/configuration_page/Agents/CommandRouter.jsx`:
- Around line 42-64: Add a command-router configuration round-trip test covering
the AgentConnectionFields and HTTP API port flow: verify defaults load, edit the
IP and required HTTP API port, submit, and confirm the saved values survive
reload/export to JSON. Also clear the port and assert required-field validation
prevents submission.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 24a90a2e-a332-4596-a7b8-5ae5b7adbaf1
📒 Files selected for processing (26)
das-cli/src/commands/config/config_cli.pydas-cli/src/commands/config/config_sections/agents_params.pydas-cli/src/commands/config/config_sections/normalize_file.pydas-cli/src/common/config/core.pydas-cli/src/common/config/store.pydas-cli/src/common/settings.pydas-cli/src/settings/config.pydas-cli/tests/integration/fixtures/config/simple.jsondas-dashboard/backend/services/config_services.pydas-dashboard/backend/shared/builders/agents_builder.pydas-dashboard/backend/shared/internal/configuration_constants.pydas-dashboard/backend/shared/mappers/nested_config_mapper.pydas-dashboard/src/components/configuration_page/Agents/AgentConnectionFields.jsxdas-dashboard/src/components/configuration_page/Agents/AgentsParams/BaseParams.jsxdas-dashboard/src/components/configuration_page/Agents/BaseParams.jsxdas-dashboard/src/components/configuration_page/Agents/CommandRouter.jsxdas-dashboard/src/components/configuration_page/Agents/ContextBroker.jsxdas-dashboard/src/components/configuration_page/Agents/EvolutionAgent.jsxdas-dashboard/src/components/configuration_page/Agents/InferenceAgent.jsxdas-dashboard/src/components/configuration_page/Agents/LinkCreation.jsxdas-dashboard/src/components/configuration_page/Agents/QueryAgent.jsxdas-dashboard/src/components/configuration_page/Agents/agentRegistry.jsdas-dashboard/src/components/configuration_page/ConfigurationPreview.jsxdas-dashboard/src/components/configuration_page/configFormUtils.jsdas-dashboard/src/pages/setup_das/SetupDas.jsxdas-dashboard/src/utils/FileSaver.js
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
das-dashboard/backend/shared/builders/agents_builder.py (1)
41-41: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick winApply the default before required-key validation.
attention_focus_strictnessis added to_BASE_QUERY_PARAMS, so_require(...)runs beforeparams.get(..., 0.0)can provide the default. Older configurations lacking this field will therefore be rejected instead of normalized to0.0. Seednormalizedbefore_require, or exclude this optional field from the required set, and add a regression test for an older config.Also applies to: 184-188
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@das-dashboard/backend/shared/builders/agents_builder.py` at line 41, Update the normalization flow in the builder method containing _BASE_QUERY_PARAMS and _require so attention_focus_strictness receives its 0.0 default before required-key validation, while preserving required validation for the other parameters. Add a regression test covering an older configuration that omits attention_focus_strictness and verifies it is normalized successfully.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@das-cli/tests/integration/test_das_peer.bats`:
- Line 26: Move the missing-config assertion from the skipped suite’s
setup-dependent test into an active Bats integration test. Ensure the test
invokes the relevant CLI command without the configuration file, verifies that
the command fails, and checks output contains FILE_NOT_FOUND_ERROR; keep the
coverage under das-cli/tests/integration/.
In `@das-dashboard/backend/shared/utils/path_utils.py`:
- Around line 20-24: Update split_endpoint to detect multi-colon, non-bracketed
IPv6 host literals before rpartition, returning the full host with default_port
(or explicitly rejecting the input); preserve correct handling for bracketed
IPv6 values and explicit ports. Add regression coverage for ::1, [::1], and
[::1]:40008, including replace_endpoint_port behavior.
In
`@das-dashboard/src/components/configuration_page/Agents/AgentsParams/BaseParams.jsx`:
- Around line 68-74: Add an accessible programmatic name to the Slider rendering
the focusStrictness value in the relevant component, using aria-label="Attention
Focus Strictness" or a correctly connected aria-labelledby reference to the
existing visual label; preserve the current slider behavior and value handling.
---
Outside diff comments:
In `@das-dashboard/backend/shared/builders/agents_builder.py`:
- Line 41: Update the normalization flow in the builder method containing
_BASE_QUERY_PARAMS and _require so attention_focus_strictness receives its 0.0
default before required-key validation, while preserving required validation for
the other parameters. Add a regression test covering an older configuration that
omits attention_focus_strictness and verifies it is normalized successfully.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 76b61c40-8cbf-4733-93da-07d8b8d07494
📒 Files selected for processing (16)
das-cli/src/commands/config/config_cli.pydas-cli/src/commands/config/config_sections/normalize_file.pydas-cli/src/commands/system/system_cli.pydas-cli/src/common/command.pydas-cli/src/common/config/core.pydas-cli/src/common/config/store.pydas-cli/src/common/container_manager/system_containers_manager.pydas-cli/src/common/prompt_types.pydas-cli/src/common/settings.pydas-cli/tests/agents_integration/conftest.pydas-cli/tests/integration/libs/errors.bashdas-cli/tests/integration/libs/utils.bashdas-cli/tests/integration/test_das_peer.batsdas-dashboard/backend/shared/builders/agents_builder.pydas-dashboard/backend/shared/utils/path_utils.pydas-dashboard/src/components/configuration_page/Agents/AgentsParams/BaseParams.jsx
Features
base_queryparameter:attention_focus_strictness(default value:0).command_routerparameters to the HTTP API.das-cliand updated validation. Note thatdas-cli config sethas not yet been updated because it will be deprecated afterward, only validation is updated.PS:
This PR also includes changes requested in Issues #1184 and #1185 since they are simple visual changes.
Demo
das-dashboardpages running with the new changes:Screencast.from.2026-07-29.13-42-23.webm