fix(desktop): let assistant read comments by id#576
Conversation
|
ok but the CLI already has a sophisticated solution for loading any HM url as markdown. And we want to focus on that implementation. Can you re-use that code, and make sure it is shared code if not already? also, include a comprehensive testing plan for both CLI and desktop. Integration and/or E2E tests, not just a basic unit test. On your node you should find a way to run the desktop app and use it manually |
728c1ae to
321a088
Compare
|
Thanks — agreed. I revised the PR to reuse the CLI markdown renderer instead of keeping the desktop assistant on a one-off renderer. What changed:
Validation I could run on this node:
I also tried to find a way to run the desktop app manually here, but this node is missing the GUI/runtime pieces: no |
|
the read tool call accepts commentId? thats crazy, it should just accept a comment URL to be passed into the read api. don't add a new parameter see a summary of all our URL formats: https://seedteamtalks.hyper.media/discussions/ultimate-hm-url-doc |
321a088 to
696a6e6
Compare
|
You’re right — I corrected the shape now. Updated the PR so the assistant
For those URLs, the desktop assistant derives the comment resource IRI and reads it through the same Re-ran validation:
I also updated the PR testing plan to focus on comment URLs rather than a separate |
Summary
readtool URL-only ({ url: string }), nocommentIdparameter/:comments/<COMMENT_ID>and?panel=comments/<COMMENT_ID>Resourceread API path used for documents instead of calling the comments API directly@shm/shared/hm-markdown, and use it from both CLI and desktop assistant readsFixes #555.
Validation run here
git diff --checkcorepack pnpm --filter @shm/desktop run typecheckcorepack pnpm --filter @shm/shared run typecheckcorepack pnpm --filter @seed-hypermedia/cli run typecheckcorepack pnpm --filter @shm/desktop run test:unit(43 files / 413 tests passed)Attempted but unavailable on this node:
bunis not installed (spawn ENOENT).DISPLAY, noxvfb-run, and Electron cannot start becauselibatk-1.0.so.0is missing.Comprehensive testing plan
CLI integration / live tests
seed-cli document get <hm-url>emits markdown through the shared renderer, including block IDs/frontmatter for documents.seed-cli document get <comment-url>/seed-cli document get hm://<COMMENT_ID>emits markdown for the comment body throughResource.seed-cli comment get <id> --jsonstill returns structured comment data unchanged.seed-cli document get --resolve <hm-url>still resolves embeds/mentions through the shared renderer.Desktop integration / E2E tests
<DOC_URL>/:comments/<COMMENT_ID>”.{url: "<comment-url>"}.Resourcepath for the comment and returns the comment markdown body, author, target document URL/title, and comment ID/version.?panel=comments/<COMMENT_ID>./:commentswithout an ID to ensure comment-list behavior remains supported.Manual desktop smoke test
corepack pnpm --filter @shm/desktop run dev:debug.<DOC_URL>/:comments/<COMMENT_ID>).readwith onlyurl, renders the comment markdown, and does not invent/request a separatecommentIdfield.<DOC_URL>?panel=comments/<COMMENT_ID>.