Skip to content

feat(routing): universal tool deep-linking query parameters & state preservation on file load - #12

Merged
gzz727007 merged 2 commits into
mainfrom
feat/universal-tool-query-params
Sep 25, 2026
Merged

gzz727007 merged 2 commits into
mainfrom
feat/universal-tool-query-params

Conversation

@gzz727007

Copy link
Copy Markdown
Member

🦭 Pull Request Description

Summary of Changes

This PR introduces a universal, standardized deep-linking query parameter engine to enable seamless landing page integration, direct visa portal pre-configurations (e.g. CEAC 2MB, IRCC 5MB), and partner referrals without polluting the client codebase with third-party domain logic.

  1. Universal Query Parameter Engine (src/utils/toolQueryParams.js):

    • Implemented strict parser & sanitizers for ?target=, ?level=, ?text=, ?opacity=, ?color=, ?angle=, ?preset=, ?pos=, ?start=, ?range=, ?interval=, and ?lang=.
    • Integrated across 5 core tools: CompressTool.vue, WatermarkTool.vue, ProtectTool.vue, PageNumberTool.vue, and SplitTool.vue.
  2. File Load State Preservation Bugfix:

    • Fixed an edge case in CompressTool.vue and SplitTool.vue where dragging/dropping a file after landing on a parameterized URL was overriding user query params with document auto-detected defaults.
    • Explicit URL query parameters now strictly take precedence over automatic document detection.
  3. Verification & Test Coverage:

    • Added tests/toolQueryParams.test.js with 22 dedicated test cases verifying edge cases, boundary clamps, invalid inputs, and unit conversion.
    • All 37 test suites and 257 tests pass 100%.
    • Validated end-to-end with headless Chrome (scripts/verify_query_params.js).

Type of Change

  • 🐛 Bug fix (non-breaking change fixing an issue)
  • ✨ New feature (non-breaking change adding functionality)
  • ⚡ Performance optimization (rendering, memory, or bundle size)
  • 🎨 UI / UX refinement
  • 🌍 Internationalization / Translations (new or updated language)
  • 📝 Documentation update (README, Guides, Comments)
  • 🧪 Test suite enhancement

🛡️ Privacy & Quality Checklist

  • 100% Client-Side Invariant: All code runs strictly in the browser RAM / WebAssembly. No user documents or telemetry data are ever sent over the network.
  • Automated Tests: I have verified that all existing tests pass (npm test).
  • New Tests Added: I have added unit or E2E tests covering new algorithmic behavior (if applicable).
  • Responsive & Cross-Browser: Verified that UI works smoothly across desktop and mobile screens.
  • Self-Review: I have performed a self-review of my own code and removed unnecessary console.log statements.

Related Issues

  • Resolves GTM & Landing Page decoupled architecture requirements.
  • Supports CEAC 2MB / IRCC 5MB one-click pre-configured visa optimization workflows.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
pdfseal bc10957 Commit Preview URL

Branch Preview URL
Sep 25 2026, 11:49 AM

@gzz727007
gzz727007 merged commit 0ec60b7 into main Sep 25, 2026
4 checks passed
@gzz727007
gzz727007 deleted the feat/universal-tool-query-params branch September 25, 2026 13:02
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