Skip to content

Conversation

@mscolnick
Copy link
Contributor

@mscolnick mscolnick commented Jan 28, 2026

Expose the status icon and allow users to click to refresh if there are any issues.

Screenshot 2026-01-27 at 7 40 36 PM
@vercel
Copy link

vercel bot commented Jan 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
marimo-docs Ready Ready Preview, Comment Jan 28, 2026 9:46pm

Request Review

@github-actions github-actions bot added the bash-focus Area to focus on during release bug bash label Jan 28, 2026
Copy link
Contributor

@manzt manzt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is nice! Just a couple comments re the new message types.

import msgspec


class LspServerHealth(msgspec.Struct, rename="camel"):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These booleans (is_running, is_responsive, has_failed) have some overlap. VS Code's LSP client uses a status enum, which we could similarly:

class LspServerHealth(msgspec.Struct, rename="camel"):
    """Health status for a single LSP server.

    Status meanings:
    - starting: process launched, initializing
    - running: healthy and responsive to pings
    - stopped: not running (never started or cleanly stopped)
    - crashed: exited with non-zero code
    - unresponsive: process alive but not responding to pings
    """

    server_id: str
    status: Literal["starting", "running", "stopped", "crashed", "unresponsive"]
    port: int
    last_ping_ms: Optional[float] = None
    error: Optional[str] = None  # Why it crashed/stopped

We could also consider started_at:

    started_at: Optional[float] = None  # Unix timestamp

which gives us uptime for free (frontend can show "running for 5m" or detect restart loops).

class LspRestartRequest(msgspec.Struct, rename="camel"):
"""Request to restart LSP servers."""

server_ids: Optional[list[str]] = None # None = restart failed servers
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth making a ServerId NewType or at least a TypeAlias scoped to this module?

ServerId = typing.NewType("ServerId", str)

msgspec handles these fine.

@mscolnick mscolnick merged commit fb28793 into main Jan 29, 2026
55 of 57 checks passed
@mscolnick mscolnick deleted the ms/lsp-status-and-refresh branch January 29, 2026 00:04
@github-actions
Copy link

🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.19.7-dev37

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

Labels

bash-focus Area to focus on during release bug bash enhancement New feature or request

3 participants