Repository navigation
fix(workflows): offer company assets in the workflow asset pickers - #56
Merged
Merged
Conversation
Every other surface that lists assets — the assets page, the session form, the Aixle Builder, share_asset, list_assets — reads them through `Asset.accessible_from_project`, which spans the project and its company. The workflow index and builder instead walked `current_project.assets`, a has_many that only sees project-owned rows, so a company asset was absent from the one picker that puts an asset on a workflow step. Nothing downstream objected to those assets, which is what made the gap easy to miss: `SessionService#scoped_resources` filters through `Asset.visible_for_project`, which includes company rows, and WorkspacePreparator mounts by id. The asset was mountable all along and just could not be chosen. The pickers beside it (agents, tools, skills, MCP servers, repositories) all already resolve through a model scope; assets were the one call site reaching around it. Co-Authored-By: Claude Opus 5 <[email protected]> Signed-off-by: Artem Petrov <[email protected]>
alex-astafyev
pushed a commit
to alex-astafyev/flow
that referenced
this pull request
Aug 19, 2026
* origin/develop: feat(personal-mcp): add connector catalog and registry-read tools (AixleHQ#55) fix(workflows): offer company assets in the workflow asset pickers (AixleHQ#56) feat(mcp): add sub-step update, delete and reorder tools (AixleHQ#54) feat(workflows): pick repositories and assets on a workflow step (AixleHQ#53)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bug
A company-scoped asset never appeared in the workflow builder's asset picker, so it could not be attached to a workflow step — even though every other surface offers it and the step would happily mount it.
Both actions read assets through the project's
has_many, which by definition only sees project-owned rows:Every other asset call site in the app already spans project + company: the assets page, the session form, the Aixle Builder,
share_asset,list_assets, the assets API. So do the pickers sitting right next to this one in the same method —Agent,Tool,Skill,MCPServerandRepositoryall resolve throughvisible_for_project. Assets were the single call site reaching around the model.Why it stayed hidden
Nothing downstream objects to a company asset, which is what made this look like "the project has no assets" rather than a bug:
SessionService#scoped_resourcesfilters throughAsset.visible_for_project, which includes company rowsWorkspacePreparatormounts by id with no scope checkSo the asset was mountable the whole time — it just could not be chosen. Setting it via the MCP server worked.
Testing
Three integration tests, all through a real Inertia partial reload, since these are deferred props and a plain GET omits the key entirely:
Verified they fail against the old scope (
Expected ["asset-1.md"] to include "asset-2.md") and pass with the new one. The third passes either way by design — it exists to catch over-broadening.make check_allgreen: 4012 backend tests, eslint, tsc, vitest, rubocop, brakeman, system tests.Note for the reviewer
Asset.accessible_from_projectandAsset.visible_for_projectare defined separately but resolve to the same thing (active rows, project OR company). Worth collapsing one day; left alone here to keep this a one-line behavior fix.🤖 Generated with Claude Code