Skip to content

‌Session history list is empty on Web UI homepage due to case mismatch of project path during project addition #40399

Closed as not planned

Description

@harry313

Description

I encountered an issue where the project session records on the main page of the Web UI are completely empty, with no historical sessions being displayed.
I suspect this problem may be caused by inconsistent path matching on Windows systems, which is related to the case sensitivity of file paths or the difference between forward slashes and backslashes.
But when I switch to the old layout, this problem does not exist.
My running environment: Windows 11, without wsl

Plugins

No response

OpenCode version

1.18.12

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. github-actions commented on Aug 4, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    If your issue is distinct from these, please add details about your OpenCode version and any steps to reproduce so maintainers can differentiate it.

  2. harry313 commented on Aug 11, 2026

    @harry313
    Author

    After several attempts, I finally figured it out. It turned out to be a case-sensitivity issue in the file path.

    For example, for the project located at E:\mywork\project-name, if you add the project using the path e:\mywork\project-name (where the case of the drive letter differs), the chat history will not be displayed.

  3. changed the title [-]Session history list is empty on the Web UI homepage[/-] [+]‌Session history list is empty on Web UI homepage due to case mismatch of project path during project addition[/+] on Aug 11, 2026
  4. jlvobra commented on Aug 28, 2026

    @jlvobra

    Comentario para el issue #40399

    Still reproduces on 1.18.23 (Windows 11 Pro, opencode web, Chrome desktop and Android).

    Root cause — the server is fine; it's the web client. The server normalizes the path and
    returns sessions correctly for any casing:

    GET /session?directory=c%3A%5Cprojects%5Cdemo&roots=true  →  sessions (stored as C:\Projects\demo)
    

    But the client compares paths case-sensitively:

    1. The per-project path store is only set when
      global.path.directory === directory — exact string match against the path typed when
      connecting the project ("c:\projects\demo" === "C:\Projects\demo" → false, so path is never set).
    2. The session list filter is
      normalize(session.directory) === normalize(path.directory), where normalize() replaces
      \ with / and trims trailing slashes but does not fold case.

    With a lowercase drive letter, (1) fails, path.directory stays undefined, and the list
    filter matches nothing → "No sessions yet", while creating sessions/chatting still works
    (the server normalizes on create).

    Workaround: disconnect the project and reconnect it with the exact canonical casing
    (C:\Projects\demo), or open http://<host>:<port>/<base64 of canonical path> directly.

    Suggested fix: fold case in the path normalizer on Windows (or always compare against the
    server-normalized path from GET /path instead of the raw user input).

  5. thdxr commented on Oct 11, 2026

    @thdxr
    Member

    Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.

    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

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

Metadata

Metadata

Assignees

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