Skip to content

[DAS-Dashboard #1202] Updated configuration page to add new agent parameters. - #304

Merged
levisingularity merged 10 commits into
masterfrom
1202/update-config-dashboard
Jul 29, 2026
Merged

[DAS-Dashboard #1202] Updated configuration page to add new agent parameters.#304
levisingularity merged 10 commits into
masterfrom
1202/update-config-dashboard

Conversation

@levisingularity

@levisingularity levisingularity commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Features

  • Added a new base_query parameter: attention_focus_strictness (default value: 0).
  • Added new command_router parameters to the HTTP API.
  • Added new schema support to das-cli and updated validation. Note that das-cli config set has not yet been updated because it will be deprecated afterward, only validation is updated.
  • Fixed a bug where an invalid schema would cause das-cli to wipe all data in the configuration file.

PS:
This PR also includes changes requested in Issues #1184 and #1185 since they are simple visual changes.

Demo

  • Demonstration of the das-dashboard pages running with the new changes:
Screencast.from.2026-07-29.13-42-23.webm

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

  • Adds attention_focus_strictness and expanded command_router.http_api settings across CLI schemas, normalization, dashboard forms, previews, and API persistence; updates the agent schema to 1.0.1.
  • Improves configuration safety by preserving files when invalid JSON/schema data is encountered, surfacing path-specific errors, handling directory-vs-file Docker fixture issues, and adding more robust endpoint/IPv6 parsing.
  • Dashboard changes add command-router HTTP API controls, clearer request-parameter labels, JSON-aware file saving, and support for server-provided serialized configuration content.
  • Correctness risk remains around configuration migration, type coercion, and command-router endpoint/port handling; invalid configuration and Docker/container lifecycle paths receive CLI integration-test updates, but dashboard behavior and new endpoint helpers have no evident component-specific tests in the changes.
  • No Debian, Docker image, deployment, or self-hosted-runner packaging changes are included; impacts are limited to runtime configuration handling and dashboard/CLI behavior.

Walkthrough

The 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.

Changes

Configuration loading and normalization

Layer / File(s) Summary
CLI configuration loading and validation
das-cli/src/common/config/store.py, das-cli/src/common/settings.py, das-cli/src/commands/config/config_cli.py, das-cli/tests/integration/*
Load failures, invalid roots, missing files, empty configurations, and directory-backed paths now receive explicit handling and messages.
Schema defaults and normalization
das-cli/src/common/config/core.py, das-cli/src/commands/config/config_sections/*, das-cli/tests/integration/fixtures/config/simple.json
Missing configuration values are recursively filled from trimmed defaults, including attention_focus_strictness and command-router HTTP API settings.
Dashboard agent configuration mapping
das-dashboard/backend/shared/{builders,internal,mappers,utils}/*, das-dashboard/backend/services/config_services.py
Dashboard constants, builders, endpoint parsing, flattening, and save responses support the updated schema and command-router HTTP API configuration.
Dashboard configuration UI and export
das-dashboard/src/components/configuration_page/*, das-dashboard/src/pages/setup_das/SetupDas.jsx, das-dashboard/src/utils/FileSaver.js
The dashboard exposes the new fields, saves command-router settings, labels defaults explicitly, accepts serialized save responses, and writes JSON files with the JSON MIME type.
CLI integration and ancillary updates
das-cli/tests/agents_integration/conftest.py, das-cli/src/commands/system/system_cli.py, das-cli/src/common/{command.py,container_manager,prompt_types.py}
Integration setup removes conflicting directories safely, while small CLI option, formatting, and spacing changes are retained.

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
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding new agent parameters to the configuration page.
Description check ✅ Passed The description matches the changeset, covering the new parameters, schema updates, validation fix, and visual changes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Tests For Behavior Changes ✅ Passed PR updates das-cli integration tests/helpers (fixture, file-not-found assertion, config-path handling) alongside the behavior changes; no dashboard tests exist.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 1202/update-config-dashboard

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 2e0c448 and 47738d7.

📒 Files selected for processing (26)
  • das-cli/src/commands/config/config_cli.py
  • das-cli/src/commands/config/config_sections/agents_params.py
  • das-cli/src/commands/config/config_sections/normalize_file.py
  • das-cli/src/common/config/core.py
  • das-cli/src/common/config/store.py
  • das-cli/src/common/settings.py
  • das-cli/src/settings/config.py
  • das-cli/tests/integration/fixtures/config/simple.json
  • das-dashboard/backend/services/config_services.py
  • das-dashboard/backend/shared/builders/agents_builder.py
  • das-dashboard/backend/shared/internal/configuration_constants.py
  • das-dashboard/backend/shared/mappers/nested_config_mapper.py
  • das-dashboard/src/components/configuration_page/Agents/AgentConnectionFields.jsx
  • das-dashboard/src/components/configuration_page/Agents/AgentsParams/BaseParams.jsx
  • das-dashboard/src/components/configuration_page/Agents/BaseParams.jsx
  • das-dashboard/src/components/configuration_page/Agents/CommandRouter.jsx
  • das-dashboard/src/components/configuration_page/Agents/ContextBroker.jsx
  • das-dashboard/src/components/configuration_page/Agents/EvolutionAgent.jsx
  • das-dashboard/src/components/configuration_page/Agents/InferenceAgent.jsx
  • das-dashboard/src/components/configuration_page/Agents/LinkCreation.jsx
  • das-dashboard/src/components/configuration_page/Agents/QueryAgent.jsx
  • das-dashboard/src/components/configuration_page/Agents/agentRegistry.js
  • das-dashboard/src/components/configuration_page/ConfigurationPreview.jsx
  • das-dashboard/src/components/configuration_page/configFormUtils.js
  • das-dashboard/src/pages/setup_das/SetupDas.jsx
  • das-dashboard/src/utils/FileSaver.js

Comment thread das-cli/src/commands/config/config_cli.py Outdated
Comment thread das-cli/src/commands/config/config_sections/normalize_file.py
Comment thread das-cli/src/common/config/store.py
Comment thread das-cli/src/settings/config.py Outdated
Comment thread das-dashboard/backend/shared/builders/agents_builder.py

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 win

Apply the default before required-key validation.

attention_focus_strictness is added to _BASE_QUERY_PARAMS, so _require(...) runs before params.get(..., 0.0) can provide the default. Older configurations lacking this field will therefore be rejected instead of normalized to 0.0. Seed normalized before _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

📥 Commits

Reviewing files that changed from the base of the PR and between 47738d7 and a033b33.

📒 Files selected for processing (16)
  • das-cli/src/commands/config/config_cli.py
  • das-cli/src/commands/config/config_sections/normalize_file.py
  • das-cli/src/commands/system/system_cli.py
  • das-cli/src/common/command.py
  • das-cli/src/common/config/core.py
  • das-cli/src/common/config/store.py
  • das-cli/src/common/container_manager/system_containers_manager.py
  • das-cli/src/common/prompt_types.py
  • das-cli/src/common/settings.py
  • das-cli/tests/agents_integration/conftest.py
  • das-cli/tests/integration/libs/errors.bash
  • das-cli/tests/integration/libs/utils.bash
  • das-cli/tests/integration/test_das_peer.bats
  • das-dashboard/backend/shared/builders/agents_builder.py
  • das-dashboard/backend/shared/utils/path_utils.py
  • das-dashboard/src/components/configuration_page/Agents/AgentsParams/BaseParams.jsx

Comment thread das-cli/tests/integration/test_das_peer.bats
Comment thread das-dashboard/backend/shared/utils/path_utils.py
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.

2 participants