Skip to content

fix(inertia): address partial reloads by their server-side prop names - #79

Merged
artempartos merged 1 commit into
developfrom
fix/inertia-partial-reload-prop-keys
Aug 10, 2026
Merged

artempartos merged 1 commit into
developfrom
fix/inertia-partial-reload-prop-keys

Conversation

@dvislov

@dvislov dvislov commented Aug 10, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Onboarding could not be completed on the first attempt: the "Connect your agents" panel sat on "Starting auth session..." forever, no agent could be connected, and "Get started" stayed disabled. A full page reload made everything appear.

Root cause

only: on a partial reload is filtered by inertia_rails (PropsResolver#excluded_by_only_partial_keys?) against the prop names the controller declares — snake_case. The camelCase form only appears later, in the prop_transformer from config/initializers/inertia.rb. Six call sites asked for the camelCase name, matched nothing, and got back a response with the prop missing; the client merged nothing and kept its stale value.

Verified against /onboarding:

X-Inertia-Partial-Data: authSessions   → props: ["errors", "currentUser", "projects"]
X-Inertia-Partial-Data: auth_sessions  → props: ["errors", "currentUser", "projects", "authSessions"]

Onboarding was hit hardest because the whole step is built on this: after POST /api/v1/terminal_sessions it runs router.reload({ only: ['authSessions'] }), and every cable broadcast about the session changing state (starting → ready) does the same. The session never arrived. A full page reload is not a partial request, which is why it worked there.

Introduced by the onboarding redesign (db0c683 / 5a086d9), where the agent-connection step started relying on partial reloads.

What's in this PR

Six keys corrected to the server-side prop names:

File Before After
Onboarding/OnboardingPage.tsx (×2) authSessions auth_sessions
Profile/Show.tsx agentModels agent_models
assets/AssetsContent.tsx assetVersions asset_versions
Overview/OverviewPage.tsx workflowRunStats, boardTaskDistribution, recentActivity snake_case
connectors/ConnectorCatalogModal.tsx connectorQuery connector_query

Three frontend tests asserted the broken key — corrected. A request test added to onboarding_render_test.rb pins both halves of the contract: the snake_case key resolves the prop, the camelCase one does not.

Left alone: only: ['editBranches'] in RepositoriesContent.tsx is a different bug — repositories_controller serves no such prop under any casing. And catalogSkills / catalogQuery in SkillsCatalogModal.tsx are correct: skills_controller declares them in camelCase.

Verification

docker compose exec -T web make check_all — fully green (rails-test, rubocop, brakeman, system-test, eslint, typescript, fe-test, vite-build).

🤖 Generated with Claude Code

`only:` is matched by inertia_rails against the prop names the controller
declares — snake_case — before our camelCase prop transformer runs
(config/initializers/inertia.rb). Six call sites asked for the camelCase
name, matched nothing, and got back a response with the prop missing; the
client merged nothing and kept its stale value.

Onboarding is where this was visible: the agent step creates an auth
session and then reloads `authSessions` to pick it up, and every cable
refresh does the same. Neither ever delivered the session, so the Connect
panel sat on "Starting auth session..." forever, no agent could be
connected, and "Get started" stayed disabled — until a full page reload,
which is not a partial request and returns every prop.

Three frontend tests asserted the broken key; they are corrected, and a
request test pins both halves of the contract on the onboarding page.

Not touched: RepositoriesContent's `only: ['editBranches']` is a
different bug — the repositories controller serves no such prop under any
casing.

Signed-off-by: Dmitry Vislov <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
@dvislov dvislov self-assigned this Aug 10, 2026
@dvislov
dvislov requested a review from artempartos August 10, 2026 09:50
@artempartos
artempartos merged commit 93033e3 into develop Aug 10, 2026
7 checks passed
alex-astafyev pushed a commit to alex-astafyev/flow that referenced this pull request Aug 19, 2026
* origin/develop:
  fix(board): give a task's run to its assignee, not to whoever pressed Run (AixleHQ#80)
  refactor(profile): redesign My Profile into paired identity/agents bands (AixleHQ#78)
  fix(inertia): address partial reloads by their server-side prop names (AixleHQ#79)
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