Skip to content

Show source file path in session info panel (local mode) #15

@Angelmmiguel

Description

@Angelmmiguel

Display the source file path in the session info section of the right panel for sessions loaded via local discovery.

This only applies to the local/CLI use case (capsule serve). When users upload files through the public website, the browser security model prevents access to the full filesystem path, so this field won't be available there. The path is only known when the session is discovered from the filesystem by the CLI. Do not show this property on the web version.

Implementation details

Data

  • DiscoveredSession already has filePath, but it's lost when storing to SessionMeta. Persist it through storeSessionFromContent() by extending the local SessionSource type:
    | { type: 'local'; filePath?: string }

UI (SessionInfo.svelte)

  • Gate behind isLocal.
  • Place as the last item in the // session_info section.
  • Two-line layout — label on one line, path value below it:
    file
    ~/.claude/projects/.../session.jsonl  [copy]
    
  • Add a copy button next to the path (navigator.clipboard.writeText()), with brief visual feedback (icon swap to checkmark for ~1.5s).

Relevant files

  • packages/web/src/lib/components/viewer/panel/SessionInfo.svelte — add the new field
  • packages/web/src/lib/types.ts — extend SessionSource
  • packages/web/src/lib/services/storage.svelte.ts — persist filePath in storeSessionFromContent()
  • packages/shared/src/types/discovery.tsDiscoveredSession (already has filePath)
  • packages/web/src/lib/features.tsisLocal flag

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions