Skip to content

Fix direct generate_later jobs, dashboard CSRF, model picker, builder errors and missing provider gems - #475

Merged
TonsOfFun merged 7 commits into
mainfrom
claude/activeagent-issues-prs-0nbims
Sep 24, 2026
Merged

TonsOfFun merged 7 commits into
mainfrom
claude/activeagent-issues-prs-0nbims

Conversation

@TonsOfFun

Copy link
Copy Markdown
Contributor

Five bug fixes from the issue backlog, one commit each.

The dashboard bundle is rebuilt in its own commit.

Heads-up for #474

actionagent/test/host_integration_test.rb:102 on #474 asserts Api::BaseController's filters exclude verify_authenticity_token. After this PR they include it by design; that assertion should move to mcp_controller_filters.

Testing

  • New tests: test/features/parameterized_direct_test.rb (jobs performed), actionagent/test/api_forgery_protection_test.rb, actionagent/test/agent_provider_client_test.rb, additions to credentials_test.rb and engine_api_test.rb, frontend/test/apiFetch.test.mjs.
  • Changed tests pass on the rails7, rails8 and railsmain gemfiles; node --test 61/61; rubocop clean on changed files.
  • The full local suite has 1 failure / 34 errors in RubyLLM and SolidAgentRuns tests — identical on unmodified main in this environment.

Fixes #346, fixes #416, fixes #426, fixes #427, fixes #461

🤖 Generated with Claude Code

https://claude.ai/code/session_01KfFzc97pARf86bj8LNR59B


Generated by Claude Code

GenerationJob#perform rejected the direct_generation_type, direct_args
and direct_options keywords DirectGeneration enqueues with, so every
direct generate_later/embed_later raised ArgumentError in the worker.
The job now rebuilds the DirectGeneration from them rather than calling
the synthetic __direct_*__ action name.

Fixes #346

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KfFzc97pARf86bj8LNR59B
The OpenRouter catalog was cut to its first 100 ids after sorting, so
everything late in the alphabet (openai/*, qwen/*, ...) could not be
chosen. The API now returns the whole catalog, and the builder and
editor pick a model with a type-ahead input over a datalist instead of a
fixed <select>, which also accepts a model id the catalog doesn't list.

Fixes #427

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KfFzc97pARf86bj8LNR59B
A 422 from POST /api/agents left the builder on its form with nothing
but a transient toast that could sit behind the page. The API now also
returns field_errors (attribute => messages); the builder shows a summary
above the step, puts each message under its field, and returns to the
Basics step when a field there was rejected.

Fixes #426

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KfFzc97pARf86bj8LNR59B
Api::BaseController skipped forgery protection although its endpoints
authenticate with the host's session cookie, so a state-changing
request was reachable cross-site. Only three of the ten components that
write sent a token, so the opt-out couldn't simply be dropped.

The fetch shim that already puts "/api/" calls on the engine's mount
(now utils/apiFetch.mjs, installed at every mount, root included) also
attaches the page's X-CSRF-Token to every mutating request, replacing
the per-component headers. With every writer covered, BaseController
keeps the protection ApplicationController turns on and answers a
rejected request with JSON. The MCP facade, authenticated by bearer
token, skips it explicitly; trace ingest was already exempt.

Fixes #461

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KfFzc97pARf86bj8LNR59B
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KfFzc97pARf86bj8LNR59B
Provider client gems are optional dependencies of activeagent, so an
agent could be given openrouter in a host without the openai gem and
only fail on its first run, mid-generation. The Agent model now checks
the provider's client loads when the provider is chosen and reports the
loader's own "add this gem" message as a validation error, which the
builder and editor show on the form.

Fixes #416

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KfFzc97pARf86bj8LNR59B
@TonsOfFun
TonsOfFun merged commit 57bdb7f into main Sep 24, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment