Add containing-folder navigation - #179
Conversation
Amp-Thread-ID: https://ampcode.com/threads/T-01a00629-a3e7-74ba-b72b-1e67445add17 Co-authored-by: Amp <amp@ampcode.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9175efd378
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| <% library = plan.created_by_user.library %> | ||
| <% folder = placement&.folder %> | ||
| <% label = folder ? "Up to containing folder — #{folder.path}" : "Up to #{plan.created_by_user.name}’s library" %> | ||
| <%= link_to library_path(library, folder: folder&.id), |
There was a problem hiding this comment.
Avoid linking archived plans to an empty location
When an archived plan is opened directly, this control is still rendered, but both branches of the destination exclude it: LibrariesController#show applies Plan.active, and an owner's redirect reaches the workspace's default active-plan scope. Clicking “Up to containing folder” therefore lands in a folder where the source plan is absent; either suppress the control for archived plans or link owners to an archived-filtered folder view.
Useful? React with 👍 / 👎.
Why
Plans can be saved in multiple personal libraries, so readers need a compact, unambiguous way to go up to the author-chosen containing folder without losing title space or landing on a generic profile.
What
Risk Assessment
Moderate — this changes plan chrome and existing library-route behavior, but the new browser is read-only, uses the existing visibility scope, and owners remain routed to their editable workspace.
Generated with Amp