Skip to content

fix(dashboard): remove encoding from slug params - #747

Open
myml wants to merge 1 commit into
iflytek:mainfrom
myml:fix/dashboard-slug-encoding
Open

fix(dashboard): remove encoding from slug params#747
myml wants to merge 1 commit into
iflytek:mainfrom
myml:fix/dashboard-slug-encoding

Conversation

@myml

@myml myml commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

What

Remove explicit encoding from slug parameters in dashboard page.

Why

The router handles parameter encoding automatically. Explicitly encoding the slug results in double-encoded characters in the URL.

How

Remove the encodeURIComponent call when passing slug to router navigation.

Testing

  • Navigate to dashboard and click on skill items
  • Verify URL parameters are correctly encoded (not double-encoded)
  • Test with Chinese characters in skill names

Impact

  • Fixes URL encoding issue for skills with special characters in names
  • No breaking changes

The router handles parameter encoding automatically. Explicitly encoding
the slug results in double-encoded characters in the URL.

Signed-off-by: wurongjie <wurongjie@uniontech.com>
@myml
myml force-pushed the fix/dashboard-slug-encoding branch from 65f5b70 to a7526b4 Compare August 24, 2026 09:02
@FenjuFu

FenjuFu commented Aug 24, 2026

Copy link
Copy Markdown
Member

Correct fix — TanStack Router percent-encodes path params when it builds the URL, so the explicit encodeURIComponent was double-encoding (visible as %25XX for non-ASCII slugs, same class of bug as the ClawHub redirect encoding issue). Low risk. Just confirm the $slug route reads the param already-decoded (router default) so the detail page still matches — a quick click-through on a Chinese-slug skill from the dashboard covers it.

@myml

myml commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

Spot on – double‑encoding fixed. Verified with a Chinese‑slug skill: URL is clean, detail page renders fine. Ready to go, resolving.

@FenjuFu FenjuFu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Re-reviewed the one-line fix and the reported Chinese-slug click-through. TanStack Router owns path-param encoding, so passing the raw slug removes the double-encoding without changing route semantics. All remote checks, DCO, and CLA are green.

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