Skip to content

Release: codemap example + cheers:open locator jump#242

Merged
haowei2000 merged 4 commits into
mainfrom
develop
Jul 17, 2026
Merged

Release: codemap example + cheers:open locator jump#242
haowei2000 merged 4 commits into
mainfrom
develop

Conversation

@haowei2000

Copy link
Copy Markdown
Collaborator

develop → main: workbench codemap design/example plugin+template, and the cheers:open host verb (locator-driven jump to code, ws line anchors). See #241.

🤖 Generated with Claude Code

haowei2000 and others added 4 commits July 17, 2026 09:36
Devin-style agent-maintained codemap for the workbench (docs/arch/CODEMAP.md):
map.yaml data contract (comments = the agent's margin notes, English
maintenance guide embedded as the file header), Cheers Locator design,
gap analysis, and a phased plan. Ships a working protocol-1 renderer
plugin (examples/codemap.plugin.html — inline YAML-subset parser,
comment-preserving line-level patch writes, standalone demo mode) and
the companion environment template (views deliberately empty so
activation never binds the file away from the plugin renderer).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Renderer plugins can now ask the host to navigate the user's view to a
cheers: locator (plugin -> host cheers:open {uri}, fire-and-forget,
ignored by hosts without support — the protocol-1 growth rule).

- features/chat/locator.ts: strict parseLocator for
  cheers:{desk,ws,msg,inbox} with GitHub-style #L<n>[-L<n>] anchors;
  rejects whitespace/control chars, traversal and malformed fragments,
  swaps reversed ranges (unit-tested).
- SandboxRenderer shape-gates the message; ChannelView.openLocator
  routes it: desk -> workbench deep-link, ws -> @handle resolved via
  channel bot members + getWorkspaceFile existence probe -> workspace
  browser, inbox -> channel files; msg is a clear not-yet error.
  Every failure mode surfaces a readable error dialog.
- CodeEditor gains scrollToLine (select + center, selection-only so the
  buffer never dirties); RemoteWorkspaceDialog threads initialLine to
  the deep-linked file — ws line anchors work end to end.
- Protocol docs (EN normative + zh design) and the SDK gain the new
  message / host.open(uri).

UI routing only: every read behind a jump still passes the existing
authz; the plugin gains no data access.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…t crash

Real-world maps turned out flat — many single-module areas — and the
one-column-per-area layout smeared them into a single overlapping row.
Areas are now packed as blocks (modules stacked, two columns past five)
flowed into rows that wrap at an adaptive target width, so the map
approaches a sane aspect ratio at any area count. Also: worldBounds()
recomputes the layout from the current model (a stale cache crashed
fit() when it ran between a model swap and the next render), and fit()
only shifts right for the zoom controls when there is horizontal slack.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…n-7f752f

feat(workbench): cheers:open host verb + codemap design/example plugin
@haowei2000
haowei2000 merged commit 0f4814b into main Jul 17, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant