Skip to content

fix(WEB-1105): fix collateral edit Cancel button redirecting to blank screen - #4005

Merged
IOhacker merged 2 commits into
openMF:devfrom
parth-sharma-10:WEB-1105-fix-collateral-edit-cancel-redirect
Sep 15, 2026
Merged

IOhacker merged 2 commits into
openMF:devfrom
parth-sharma-10:WEB-1105-fix-collateral-edit-cancel-redirect

Conversation

@parth-sharma-10

@parth-sharma-10 parth-sharma-10 commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Description

Continues #3797, which the original author (@Farah-Nahle-FOO) handed off. Same root cause and same one-line fix, rebased onto current dev.

The Cancel button's routerLink on the client collateral edit form pointed to ['../../'], overshooting the collateral view route (one level up, not two) and landing on a path with no matching component — a blank screen instead of the collateral's details page.

submit() in the same component already navigates with this.router.navigate(['../'], { relativeTo: this.route }) on success, so Cancel now matches that existing convention.

Related issue

WEB-1105 · continues #3797

Verification

  • Confirmed ['../../'] is still present on current dev (bug reproduces).
  • Confirmed submit() uses ['../'] relative to the same route — Cancel now matches it.
  • No other routerLink in src/app/collaterals/ has the same overshoot.
  • prettier --check passes on the changed file.

Summary by CodeRabbit

  • Bug Fixes
    • Corrected the Cancel button in the collateral editing form so it returns to the appropriate previous page.

… screen

The Cancel button's routerLink navigated two levels up (['../../'])
instead of one (['../']), overshooting the collateral view route and
landing on a path with no matching component. submit() already
navigates with ['../'] on the same route, so Cancel now matches it.

Continues openMF#3797.

Claude-Session: https://claude.ai/code/session_017c5ZQZugitY2bDF6Y3LQU2
@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key: "pre_merge_checks"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: c539379d-66e8-443a-979f-cc951bd915df

📥 Commits

Reviewing files that changed from the base of the PR and between 3b3feb0 and 01e7547.

📒 Files selected for processing (1)
  • src/app/collaterals/edit-collateral/edit-collateral.component.html

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


Walkthrough

The edit collateral form changes the Cancel button route from ['../../'] to ['../'].

Changes

Collateral navigation

Layer / File(s) Summary
Cancel route update
src/app/collaterals/edit-collateral/edit-collateral.component.html
The Cancel button uses ['../'] instead of ['../../'] for router navigation.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~2 minutes

Change: Bug fix

Suggested reviewers: adamsaghy

Merge Risk: ⚪ Minimal · up to 026c8

Cancel now returns users to the collateral details page as intended.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the fix to the collateral edit Cancel button and its blank-screen redirect behavior.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@IOhacker
IOhacker merged commit ebcc891 into openMF:dev Sep 15, 2026
6 of 7 checks passed
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