Fix critical bug: revert path formatting in session-create-form input

The working directory input was displaying formatted paths (~/Documents) but
storing them as-is when edited, causing backend errors since it expects
absolute paths.

Reverted to showing raw paths in the input field. The file browser component
is unaffected as it correctly only formats for display, not for input.

This ensures workingDir always contains absolute paths as expected by the API.
This commit is contained in:
Peter Steinberger 2025-06-28 14:41:17 +02:00
parent 836db22a5e
commit dfb36f7cf8

View file

@ -16,7 +16,6 @@ import { customElement, property, state } from 'lit/decorators.js';
import './file-browser.js';
import type { AuthClient } from '../services/auth-client.js';
import { createLogger } from '../utils/logger.js';
import { formatPathForDisplay } from '../utils/path-utils.js';
import type { Session } from './session-list.js';
const logger = createLogger('session-create-form');
@ -390,7 +389,7 @@ export class SessionCreateForm extends LitElement {
<input
type="text"
class="input-field"
.value=${formatPathForDisplay(this.workingDir)}
.value=${this.workingDir}
@input=${this.handleWorkingDirChange}
placeholder="~/"
?disabled=${this.disabled || this.isCreating}