This repository was archived by the owner on Sep 23, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
This repository was archived by the owner on Sep 23, 2025. It is now read-only.
Dialectic URL parser doesn't handle spaces in regex patterns #24
Copy link
Copy link
Open
Description
Problem
Dialectic URLs with spaces in regex patterns fail to parse correctly. The Rust MCP server should automatically URL-encode spaces to %20 but currently doesn't.
Example
This walkthrough contains a broken dialectic URL:
# Action Button Code Flow Walkthrough
Let's trace what happens when you click an action button in the walkthrough system.
**Current Status**: Buttons render but clicking fails due to CSP violations and missing message handlers.
## Current Implementation
These links should now work properly:
**Step 1**: Button HTML generation in [renderSection](dialectic:extension/src/walkthroughWebview.ts?regex=onclick.*handleAction)
**Step 2**: JavaScript handleAction function in [webview script](dialectic:extension/src/walkthroughWebview.ts?regex=function handleAction)
**Step 3**: Message sent to extension via [vscode.postMessage](dialectic:extension/src/walkthroughWebview.ts?regex=vscode.postMessage)
**Step 4**: Extension receives message in [handleWebviewMessage](dialectic:extension/src/walkthroughWebview.ts?regex=handleWebviewMessage)
## The Problem
**CSP Issue**: Inline `onclick` handlers violate Content Security Policy
**Missing Handler**: Extension doesn't handle `'action'` message type
**No IPC**: No communication back to MCP server/AI assistantBroken URL
dialectic:extension/src/walkthroughWebview.ts?regex=function handleAction
The space in function handleAction causes the URL parsing to fail.
Working Workaround
dialectic:extension/src/walkthroughWebview.ts?regex=function.*handleAction
Using .* instead of a space works.
Expected Behavior
The Rust dialectic URL processor should:
- Automatically URL-encode spaces in regex patterns (
function handleAction→function%20handleAction) - Parse URLs with spaces correctly
- Give clear error messages when URL parsing fails
Current Behavior
URLs with spaces in regex patterns silently fail - no navigation occurs and no error is shown.
Impact
This affects the usability of walkthrough system when trying to search for multi-word patterns in code.
Metadata
Metadata
Assignees
Labels
No labels