Skip to content

[FEATURE]:[Web]: Clickable file:line references in messages (jump to file and line) #13430

@InCerryGit

Description

@InCerryGit

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

In the OpenCode web UI, references to source files with line numbers (e.g. src/foo/bar.ts:123) shown in assistant messages or logs are currently rendered as plain text.

I would like these references to be clickable, so that clicking them:

  • Opens the referenced file in the web file viewer
  • Automatically scrolls to (or highlights) the specified line number

This would bring the web experience closer to the desktop version and significantly improve code navigation and review workflows.


Example

When a message contains something like:
src/XXXX.Core/XXXXX/XXXXXXX.cs:545

*.txt
Plaintext
Clicking it should:

  1. Open XXXXXXX.cs in the web file viewer
  2. Jump directly to line 545 (or the closest available line)

Why this matters

  • This is a very common workflow when reviewing explanations, logs, or analysis generated by OpenCode.
  • On desktop, similar references can already be navigated efficiently.
  • On web, users currently have to:
    • Manually search for the file
    • Scroll to the line number by hand
  • This breaks context and slows down debugging, review, and learning workflows.

For users relying on the web UI (including remote access or mirror use cases), this missing feature is especially noticeable.


Expected behavior / possible implementation

Possible approaches (implementation detail up to maintainers):

  • Detect path/to/file:line patterns in rendered messages
  • Render them as clickable links
  • On click:
    • Open the file in the existing web file viewer
    • Scroll to / focus the target line
  • Gracefully handle cases where:
    • The file does not exist
    • The line number is out of range

Even a minimal implementation (open file + approximate scroll) would already be a big usability improvement.


Current behavior

  • File and line references are displayed as plain text
  • No navigation or interaction is available from messages in the web UI

Additional context

This feature would also align well with ongoing efforts to improve web/desktop parity and make the web UI more suitable for serious code review and debugging tasks.

If needed, I can provide screenshots or short screen recordings to demonstrate the current limitation.

Metadata

Metadata

Assignees

Labels

discussionUsed for feature requests, proposals, ideas, etc. Open discussionwebRelates to opencode on web / desktop

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions