Skip to content

Fix/5007 sandboxes in projects menu - #5302

Open
manziosee wants to merge 5 commits into
OpenFn:mainfrom
manziosee:fix/5007-sandboxes-in-projects-menu
Open

manziosee wants to merge 5 commits into
OpenFn:mainfrom
manziosee:fix/5007-sandboxes-in-projects-menu

Conversation

@manziosee

Copy link
Copy Markdown
Contributor

Description

This PR fixes the Projects page (/projects) so it lists a sandbox the user
is a collaborator on when they aren't on its parent project.

The page only listed top-level projects (parent_id IS NULL), so someone
added to a sandbox alone never saw it there and could only reach it through
the project picker (Cmd+P). get_projects_overview/2 now also lists a sandbox
when the user is on it and on no project above it. That's the same
access-root rule the picker already uses (roots_for_user_tree/1), so the two
now agree.

These rows get a sandbox icon. The parent's name isn't shown, since the user
has no access to the parent. Permissions don't change: nobody gains access to
anything, and sandbox access without parent access still works as before.

Closes #5007

Validation steps

  1. As user A, create a project and a sandbox inside it.
  2. Add user B as a collaborator on the sandbox only, not on the parent.
  3. Log in as user B and open the Projects page. The sandbox is listed with a
    beaker icon, and the parent project is not listed or named anywhere.
  4. Click the sandbox row. It opens the sandbox's workflows.
  5. Add user B to the parent project and reload. Only the parent is listed
    now, and the sandbox is reached from inside it as before.

Tests: the new cases at the end of describe "get_projects_overview/2" in
test/lightning/projects_test.exs, plus one in
test/lightning_web/live/dashboard_live_test.exs. They cover a sandbox-only
member, nested sandboxes (only the topmost listed), a parent member (no
duplicate), sandboxes the user isn't on or that are scheduled for deletion
(hidden), and support users.

Additional notes for the reviewer

  1. This branch includes chore/bump-yaml-elixir (yaml_elixir 2.12.1 to
    2.13.0, mix.lock only) because a new advisory, CVE-2026-140436, fails
    mix hex.audit in CI lint for every branch, main included. I'll open that
    as its own PR. That diff will disappear here once it's merged.
  2. The parent's name is left out on purpose, to match the picker. If you'd
    rather show "in " for context, that's a one-line change, but it
    would tell the user that a project they can't open exists.

AI Usage

Please disclose whether you've used AI anywhere in this PR (it's cool, we just
want to know!):

  • I have used Claude Code
  • I have used another model
  • I have not used AI

You can read more details in our
Responsible AI Policy

Pre-submission checklist

  • I have performed an AI review of my code (we recommend using /review
    with Claude Code)
  • I have implemented and tested all related authorization policies.
    (e.g., :owner, :admin, :editor, :viewer)
    N/A: no policy changes. The listing only shows projects the user
    already has a project_users row on, and tests cover who sees what.
  • I have updated the changelog.
  • I have ticked a box in "AI usage" in this PR

MDEx rendered AI assistant messages in the legacy LiveView component,
which OpenFn#4908 removed. Nothing has called it since, and mix hex.audit now
fails on five advisories published for MDEx 0.13.3 on 30 Nov 2026, so
every PR's lint job fails.

Remove the dependency instead of upgrading it to 0.15.0, and drop mdex
and mdex_native from the lock file with mix deps.unlock --unused.

Closes OpenFn#4948
The Projects page only listed top-level projects, so a collaborator
added to a sandbox but not to its parent never saw it there and could
only reach it through the project picker.

List a sandbox when the user is on it and on no project above it, the
same access-root rule the picker uses. Such rows carry the sandbox icon.
The parent's name isn't shown, since the user can't open it. Access
itself is unchanged.

Fixes OpenFn#5007
yaml_elixir 2.12.1 expands nested YAML aliases without a limit, so a
crafted file can exhaust memory. The advisory fails mix hex.audit in CI
lint. 2.13.0 carries the fix and fits the existing ~> 2.12 constraint,
so only mix.lock changes.
@github-project-automation github-project-automation Bot moved this to New Issues in Core Dec 4, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New Issues

Development

Successfully merging this pull request may close these issues.

Sandbox collaborators who aren't on the parent project can't see the sandbox in the main projects menu

1 participant