# Coder Studio v0.4.2

## 中文

### 这个版本为什么重要

`v0.4.2` 把 Markdown 和 HTML 预览真正带进了产品，而不是停留在设计稿里。它同时继续统一终端恢复链路，并补了一轮诊断、刷新恢复、移动端模式切换和 Windows 路径安全修正，让“读文档、看页面、断线恢复、刷新继续”这些高频动作更连贯。

实际体验上，这个版本意味着：

- workspace 里可以直接预览 Markdown 文档和静态 HTML 文件，不必总是切回本地工具
- 终端恢复协议和 websocket 恢复流程更统一，刷新或重连后的恢复语义更清晰
- 运行时诊断、supervisor 刷新恢复、关闭 session 后的提示态和移动端文件细节切换都更稳
- Windows 路径安全和 server CI 构建检查进一步收紧，减少跨平台发布意外

### 这个版本包含哪些变化

- 新增 preview session store、resource loader、HTML preview routes 和 Markdown 渲染链路
- 在 web 端加入 preview API、文件类型识别，以及 Markdown / HTML 预览界面
- 收紧 preview asset 路径解析，并补齐 preview 相关 runtime 依赖声明
- 为终端恢复补上共享协议类型，并统一 websocket recovery flow
- 细化 diagnostics runtime checks，提升对本地运行时环境的识别质量
- 修复 supervisor 刷新后的状态 hydration、关闭 session 后的 recovery overlay，以及窄容器下状态 chips 抖动问题
- 统一移动端文件 detail 和 mode switching 行为，并恢复 standalone UI preview 入口
- 加固 Windows 路径安全检查，并恢复 server CI build

### 谁最受益

- 希望直接在 workspace 中阅读 Markdown 文档或预览静态 HTML 的用户
- 依赖浏览器终端持续工作的开发者
- 经常刷新页面、重连 session 或在移动端查看文件的用户
- 需要更稳定 Windows 路径处理和 CI 构建链路的维护者

### 安装或升级

```bash
npm install -g @spencer-kit/coder-studio
coder-studio open
```

### 完整变更

- [Compare `v0.4.1...v0.4.2`](https://github.com/spencerkit/coder-studio/compare/v0.4.1...v0.4.2)

## English

### Why this release matters

`v0.4.2` turns Markdown and HTML preview into a shipped product capability instead of a design-only idea. It also keeps tightening terminal recovery, diagnostics, refresh restore, mobile mode switching, and Windows path safety so the common flow of reading docs, previewing pages, reconnecting, and resuming work feels more coherent.

In practice, this release means:

- you can preview Markdown documents and static HTML files directly inside the workspace
- terminal recovery protocol and websocket recovery behavior are more unified, making refresh and reconnect semantics easier to trust
- runtime diagnostics, supervisor refresh restore, closed-session recovery states, and mobile file detail switching are more dependable
- Windows path safety and server CI build checks are stricter, reducing cross-platform release surprises

### Included in v0.4.2

- add the preview session store, resource loader, HTML preview routes, and Markdown rendering pipeline on the server
- add the preview API, file classification, and Markdown / HTML preview surfaces on the web side
- tighten preview asset path resolution and declare the required preview runtime dependencies
- add shared terminal recovery protocol types and unify the websocket recovery flow
- refine runtime diagnostics checks for clearer local environment detection
- fix supervisor state hydration after refresh, improve the closed-session recovery overlay, and stabilize status chips in narrow containers
- unify mobile file detail and mode switching behavior, and restore the standalone UI preview entry
- harden Windows path safety checks and restore the server CI build

### Who benefits most

- users who want to read Markdown docs or preview static HTML directly inside the workspace
- developers relying on long-lived browser terminal sessions
- users who refresh, reconnect, or inspect files from mobile frequently
- maintainers who need steadier Windows path handling and CI builds

### Install or upgrade

```bash
npm install -g @spencer-kit/coder-studio
coder-studio open
```

### Full changelog

- [Compare `v0.4.1...v0.4.2`](https://github.com/spencerkit/coder-studio/compare/v0.4.1...v0.4.2)
