Skip to content

arch: rename sessionId prop to sessionKey in files feature #283

Description

@cursor

Problem

frontend-state.md requires shell/panel state to be keyed by the complete SessionRef (via sessionRefKey(sessionRef)). The files panel correctly passes panel.sessionKey, but FileTreeAdapter names the prop sessionId:

  • apps/app/src/features/files/file-tree-adapter.tsx — prop sessionId: string
  • apps/app/src/features/files/files-panel.tsx — passes panel.sessionKey into sessionId

The name suggests a bare UUID and invites future callers to pass only ref.sessionId instead of the full composite key.

Why it matters

Identity bugs when the same session UUID exists under different projects or harness agents.

Suggested fix

Rename the prop to sessionKey (or accept SessionRef and call sessionRefKey internally). Consider a type alias SessionKey = ReturnType<typeof sessionRefKey>.

Severity

P3

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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