Skip to content

Fix navigation for custom editor paths#7784

Merged
cstns merged 2 commits into
mainfrom
fix/custom-editor-path-breaking-editor-navigation
Jul 10, 2026
Merged

Fix navigation for custom editor paths#7784
cstns merged 2 commits into
mainfrom
fix/custom-editor-path-breaking-editor-navigation

Conversation

@cstns

@cstns cstns commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Description

extends on #7783

Adds a useUrlHelper composable (safeOrigin, originsMatch) that wraps new URL().origin in a try/catch so a malformed URL can't throw and break message handling.

Wires it into the two places that compare postMessage origins:

Related Issue(s)

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on FlowFuse/helm to update ConfigMap Template
    • Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production
  • Link to Changelog Entry PR, or note why one is not needed.

Labels

  • Includes a DB migration? -> add the area:migration label

@cstns
cstns requested a review from andypalmi July 10, 2026 09:58
@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.04%. Comparing base (0d4cf33) to head (9c5e6aa).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7784      +/-   ##
==========================================
- Coverage   75.05%   75.04%   -0.02%     
==========================================
  Files         429      429              
  Lines       22714    22777      +63     
  Branches     6012     6036      +24     
==========================================
+ Hits        17048    17092      +44     
- Misses       5666     5685      +19     
Flag Coverage Δ
backend 75.04% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@andypalmi andypalmi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good. One thing to fix before merge:

  • UrlHelper.ts is missing a trailing newline, which fails the eol-last lint rule.

Non-blocking suggestion: useUrlHelper has no reactive state or lifecycle, so it's a plain function factory rather than a composable. Might fit better under utils/ alongside the other URL helpers.

@cstns
cstns merged commit d87c69d into main Jul 10, 2026
28 of 29 checks passed
@cstns
cstns deleted the fix/custom-editor-path-breaking-editor-navigation branch July 10, 2026 11:35
@cstns

cstns commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

Non-blocking suggestion: useUrlHelper has no reactive state or lifecycle, so it's a plain function factory rather than a composable. Might fit better under utils/ alongside the other URL helpers.

that's a good observation! I'm still undecided if we should keep both composables and utils or merge them into one

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