Skip to content

feat(fallback): enable fallback by default and align async chart states#208

Merged
SantiagoDePolonia merged 3 commits intomainfrom
feat/fallback-hardening
Apr 5, 2026
Merged

feat(fallback): enable fallback by default and align async chart states#208
SantiagoDePolonia merged 3 commits intomainfrom
feat/fallback-hardening

Conversation

@SantiagoDePolonia
Copy link
Copy Markdown
Contributor

@SantiagoDePolonia SantiagoDePolonia commented Apr 4, 2026

Summary

  • enable translated-route fallback by default in config
  • default new workflow drafts to fallback enabled
  • align workflow async usage and audit styling with shared .ep-node state classes
  • highlight async nodes as success when rendering audit-log execution charts

Testing

  • go test ./config ./internal/app
  • node --test internal/admin/dashboard/static/js/modules/execution-plans.test.js
  • node --test internal/admin/dashboard/static/js/modules/execution-plans-layout.test.js

Summary by CodeRabbit

  • New Features

    • Execution plans now enable the fallback feature by default.
    • Async "Usage" and "Audit" nodes support dynamic highlighting classes for optional visual emphasis.
  • Configuration

    • Global fallback default mode changed from "off" to "auto" to enable automatic fallback resolution.
  • Style

    • Removed static accent rules for certain async node variants so their coloring is driven by the new dynamic classes.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 4, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: a5055518-309a-4b4e-a7ca-694e7b3adfc3

📥 Commits

Reviewing files that changed from the base of the PR and between 9cb357d and 2f2f5b2.

📒 Files selected for processing (5)
  • PossibleRefactoring.md
  • config/config.go
  • config/config_test.go
  • internal/fallback/resolver.go
  • internal/fallback/resolver_test.go

📝 Walkthrough

Walkthrough

Default fallback mode is changed from "off" to "auto" across config, loader, and resolver. Admin dashboard enables fallback by default, adds dynamic class plumbing for async usage/audit nodes, removes related CSS accents, and updates tests and docs; several resolver and config helpers were added/adjusted.

Changes

Cohort / File(s) Summary
Fallback config & loader
config/config.example.yaml, config/config.go, config/config_test.go
Changed fallback.default_mode default from "off""auto"; added ResolveFallbackDefaultMode(mode FallbackMode) FallbackMode; updated defaulting in build/load paths and tests to resolve blank → FallbackModeAuto.
Resolver logic & tests
internal/fallback/resolver.go, internal/fallback/resolver_test.go
Replaced inline defaulting with config.ResolveFallbackDefaultMode(...); added test ensuring blank default resolves to auto and yields fallbacks for a sample model/provider.
Admin dashboard JS (execution plans)
internal/admin/dashboard/static/js/modules/execution-plans.js, .../execution-plans.test.js, .../execution-plans-layout.test.js
Enabled features.fallback by default; added highlightAsyncPresent plumbing and epAsyncNodeClass(visible, highlightPresent) helper; added usageNodeClass/auditNodeClass fields to chart model; updated tests and layout test expectations to reflect dynamic class bindings and removed CSS-based accent assertions.
Execution plan template
internal/admin/dashboard/templates/execution-plan-chart.html
Added dynamic :class bindings for async nodes: :class="{{.}}.usageNodeClass" and :class="{{.}}.auditNodeClass".
Dashboard styling
internal/admin/dashboard/static/css/dashboard.css
Removed variant-specific --accent rules for .ep-node-async-usage and .ep-node-async-audit, eliminating hardcoded success/warning accents.
Possible refactor notes
PossibleRefactoring.md
Appended refactoring items (6–10) proposing consolidation and ownership moves around fallback-mode handling, resolver deduplication, and parsing extraction; purely documentation suggestions.
Misc (struct layout)
config/config.go (VectorStoreConfig alignment)
Adjusted struct field alignment in VectorStoreConfig (no API change).

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰 From "off" to "auto" I bound,
Hopping where fallbacks now are found.
Nodes that once wore colored spice,
Now wear classes, neat and nice.
Cheers—this rabbit's code-approved round!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 23.08% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the two main changes: enabling fallback by default and aligning async chart styling states.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 feat/fallback-hardening

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 and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@config/config.go`:
- Around line 870-872: Update the blank-mode handling and comment so the new
default "auto" is applied consistently: change
internal/fallback/resolver.NewResolver to treat an empty DefaultMode the same
way config.buildDefaultConfig() does (interpret "" as FallbackModeAuto instead
of FallbackModeOff) and update config.FallbackConfig.DefaultMode's doc comment
to state the default is "auto"; also ensure config.loadFallbackConfig() and
resolver.NewResolver use the same canonicalization logic for "" ->
FallbackModeAuto so environment-backed settings like fallback.default_mode:
${FEATURE_FALLBACK_MODE:-} do not silently become "off".
🪄 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: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 0c12918f-f5b0-4989-8f18-de88ca0a413b

📥 Commits

Reviewing files that changed from the base of the PR and between 2c79e5f and 9cb357d.

📒 Files selected for processing (8)
  • config/config.example.yaml
  • config/config.go
  • config/config_test.go
  • internal/admin/dashboard/static/css/dashboard.css
  • internal/admin/dashboard/static/js/modules/execution-plans-layout.test.js
  • internal/admin/dashboard/static/js/modules/execution-plans.js
  • internal/admin/dashboard/static/js/modules/execution-plans.test.js
  • internal/admin/dashboard/templates/execution-plan-chart.html
💤 Files with no reviewable changes (1)
  • internal/admin/dashboard/static/css/dashboard.css

@SantiagoDePolonia SantiagoDePolonia merged commit 3f81d47 into main Apr 5, 2026
16 checks passed
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.

1 participant