Skip to content

Conversation

@koppen
Copy link
Member

@koppen koppen commented Oct 10, 2025

No description provided.

Copilot AI review requested due to automatic review settings October 10, 2025 12:07
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements a "redirect back" functionality for the Uchi admin interface, allowing navigation between scoped and unscoped contexts when creating or editing records.

  • Adds a path_for_cancel method to intelligently redirect to the parent model when in a scoped context
  • Updates edit and new forms to use the new cancel path logic
  • Adds comprehensive test coverage for edit and new actions in both scoped and unscoped repository controllers

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/controllers/uchi/scoped_repository_controller_test.rb Adds test coverage for edit and new actions, including proper cancel link behavior
test/controllers/uchi/repository_controller_test.rb Adds test coverage for edit and new actions in unscoped context
app/views/uchi/repository/new.html.erb Updates cancel link to use new path_for_cancel helper
app/views/uchi/repository/edit.html.erb Updates cancel link to use new path_for_cancel helper
app/controllers/uchi/repository_controller.rb Implements path_for_cancel method and refactors scope handling
app/components/uchi/ui/index/records_table/records_table.html.erb Updates edit link to pass scope parameter
app/components/uchi/ui/index/records_table.rb Adds path_for_edit method to include scope in edit URLs
app/components/uchi/field/belongs_to.rb Refactors collection mapping to use repository title method

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@koppen koppen merged commit fc58dab into main Oct 10, 2025
3 checks passed
@koppen koppen deleted the redirect_back branch October 10, 2025 12:14
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.

1 participant