Skip to content

feat: admins comment on Drop's own pages, and agents fix what they say - #63

Merged
vite-hub[bot] merged 24 commits into
mainfrom
feat/console-comments
Nov 1, 2026
Merged

vite-hub[bot] merged 24 commits into
mainfrom
feat/console-comments

Conversation

@onmax

@onmax onmax commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Drop admins had no way to leave a note about Drop's own pages where they see the problem. Agents could not read those notes either.

With this change, an admin who opens the Console gets the Comments toolbar on every Drop page:

  • They pin a comment on any element, reply, and resolve, and see other admins' pins, avatars, and cursors live.
  • Each thread keeps its page, element, Vue components with their files, browser, and build.
  • Agents list, read, reply to, and resolve threads through Drop's MCP. These tools are for admins only.
  • Everyone else gets Drop's pages unchanged: no script and no extra request.

This uses the released ViteHub Comments stack: vite-hub/vitehub#2858, #2860, #2861, #2862, #2864. The whole stack, #2864 included, has landed, and Drop now pins vite-hub@0.1.0.

Changes

  • server/comments.ts: defineComments(). With Drop's Console (auth: "app"), Comments' people are the people that the Console lets use its comments section.
  • server/console-authorize.ts: admins get the comments section next to auth.
  • server/mcp/site-comments.ts: comments_list_threads, comments_get_thread, comments_reply, and comments_resolve_thread in Drop's /mcp, so OAuth clients such as Claude Code reach them. They wrap commentsMcpTools() from ViteHub, and only admins may call them. ViteHub also serves the same tools at /_vitehub/mcp for Console sessions.
  • Migrations 0003_vitehub_comments and 0005_vitehub_comments_release: ViteHub's thread, comment, scope counter, and forge-link tables. The release migration seeds scope counters from existing thread numbers.
    • server/databases/comments.ts re-exports them for drizzle-kit only, so pnpm db:generate keeps them.
    • drizzle-kit also wanted to create comment_attachments and comments.element_x/y again. 0000_init.sql already has them, but its snapshot did not, so I took them out of the SQL. The latest snapshot lists them and the already-applied comments.suggestion, so later migrations stop trying.
    • Upgrade tests cover the current consolidated Drop baseline. Converting older pre-squash Drop schemas remains outside this PR.
  • vite-hub pins the released 0.1.0. The release includes the lazy route and environment fixes previously carried as Drop patches.

Evidence

Original preview run: two admins (Ada, Ben) and a member (Cy) in headless Chromium against a production Node build of this branch (DROP_HOST=vps, SQLite, memory Realtime):

Ben sees Ada's pin, her cursor, and both avatars presence
Ada sees Ben's reply arrive without a reload reply
The Console Comments section lists the threads console

What else the run showed:

  • After Ada opened /_vitehub, she had the vitehub-comments cookie. Her pages got <script … nonce="…" data-vitehub-comments> with the page's CSP nonce, and the overlay ran under 'strict-dynamic'.
  • Through ViteHub MCP with Ada's session, comments_get_thread returned the URL, /drops route, <h1> element, app/layouts/dashboard.vue and app/components/PageShell.vue, the viewport, the browser, and the build branch and commit, then resolved the thread.
  • Cy, a member, got no script on normal pages. With ?comments in the URL, the page loads the overlay, which asks the server, is denied, and says comments are only for the team. Cy got no toolbar, no cookie, and 403 from /_vitehub/mcp.
  • The browser logged no page errors. The only console errors were 422 from the script signing up accounts that already existed.

Validation

  • pnpm install --frozen-lockfile --ignore-scripts, vitehub types prepare, and nuxt prepare pass.
  • pnpm test test/deploy/migrate-d1.test.mjs test/mcp/tools.test.mjs test/cost/auth-console.test.mjs passes 40 tests, including the Comments tools' schemas, the admin gate, existing comment preservation, counter initialization, and snapshot consistency.
  • drizzle-kit check passes. Migration generation against a temporary copy of the migration history reports no schema changes; fresh and current-baseline preview SQLite migrations pass.
  • Focused vp lint and vp fmt --check pass on the changed source and configuration files.
  • Full typecheck and production build are left to hosted CI.

Not done yet

  • nuxt dev: the presence WebSocket never upgrades under nuxt dev. Sockets open but carry no frames, so dev shows comments without presence. The production Node build above works. I did not find whether this is Drop's dev setup or Nuxt's.
  • Cloudflare: not run. Presence there uses the Durable Object room authority.
  • Component chain: the run above was on the stack build before #2861 kept only the app's own components, so its list still had names such as RouterView and Primitive. The pinned release includes that fix, which has unit tests but no browser run on Drop.
  • Drop's own drop comments: they move onto the primitive in the next PR of this stack.

🤖 Generated with Claude Code

… what they say

Drop turns on ViteHub Comments (server/comments.ts). Opening the Console
turns the toolbar on for admins: they pin comments on any page, reply,
resolve, and see each other live. Each thread keeps its page, element,
Vue components and their files, browser, and build. Agents read and
resolve threads through Drop's MCP (comments_* tools, admins only) and
ViteHub MCP. Other people get the pages unchanged. ViteHub moves to the
Comments stack (vite-hub/vitehub#2864).
@onmax onmax changed the title feat/console comments feat: admins comment on Drop's own pages, and agents fix what they say Oct 26, 2026
@vite-hub

vite-hub Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor
Session Status Started Duration
Pending Completed Not started —
View session Last seen running 2026-11-01T13:52:18.926Z 0s
View session Completed 2026-11-01T13:30:09.992Z 16m 9s
View session Completed 2026-11-01T12:56:50.869Z 15m 27s

Latest result

Pull request merged.

Final answers

Session

Pull request merged.

Session

Waiting for GitHub merge request 9db35124-f287-49ec-bb53-8b038a46d0bb.

Session

Pushed 83c6680 resolving dependency conflicts and Nitro’s virtual MCP handler failure. All 65 focused tests, lint, formatting, Nuxt preparation, and frozen installation pass. Production Nuxt initialization confirms the corrected handler. Host refresh still fails on the unchanged --ignore-pnpmfile checksum mismatch. Pullfrog: inherited P1 pre-squash upgrades remain declined; the snapshot finding remains fixed. Awaiting hosted CI.

Session

Pushed 83c6680 resolving dependency conflicts and Nitro’s virtual MCP handler failure. All 65 focused tests, lint, formatting, Nuxt preparation, and frozen installation pass. Production Nuxt initialization confirms the corrected handler. Host refresh still fails on the unchanged --ignore-pnpmfile checksum mismatch. Pullfrog: inherited P1 pre-squash upgrades remain declined; the snapshot finding remains fixed. Awaiting hosted CI.

Session

Pushed 6f956f4 fixing generated-root tests for ViteHub 0.1’s API. Reproduced the CI failures; 45 focused tests, lint, formatting, and Nuxt preparation pass. Normal frozen installation succeeds; the host’s --ignore-pnpmfile installation conflicts with the unchanged hook checksum. Pullfrog: P1 inherited pre-squash upgrades remain declined as outside scope; the snapshot finding remains fixed. Awaiting hosted CI.

View session

Pushed 6f956f4 fixing generated-root tests for ViteHub 0.1’s API. Reproduced the CI failures; 45 focused tests, lint, formatting, and Nuxt preparation pass. Normal frozen installation succeeds; the host’s --ignore-pnpmfile installation conflicts with the unchanged hook checksum. Pullfrog: P1 inherited pre-squash upgrades remain declined as outside scope; the snapshot finding remains fixed. Awaiting hosted CI.

View session

Pushed 688296d with narrow doctor exceptions for verified page-tool authorization. `pnpm run doctor` now passes after reproducing both warnings; all 40 focused tests, config typecheck, lint and formatting pass. Pullfrog: historical P1 pre-squash upgrades remain declined as inherited/out of scope; snapshot finding already fixed. Normal frozen installation passed; the host’s --ignore-pnpmfile install conflicts with the hook checksum. Awaiting CI.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
vitehub-drop fc05b66 Oct 26 2026, 07:07 AM

@vite-hub

vite-hub Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

The PR body's merge prerequisite is still unmet: vite-hub/vitehub#2864 currently shows Draft, and package.json still pins the 1674483 pkg.pr.new build. Land the complete ViteHub stack including #2864 and publish a release containing it; Drop can then replace the preview pin with that release. Please comment here when the release is available so the repair can resume.

@vite-hub

vite-hub Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor
Session Status Started Duration
Pending Waiting 2026-10-28T14:09:49.946Z Paused

Next step

Verified c402f15 with a clean checkout and green current-head CI. After preparing generated files, 44 focused tests passed; scoped vp check and drizzle-kit check passed. No actionable review findings or source repairs remain. Reconfirmed ViteHub #2864 is Draft, so the required upstream release still blocks completion.

Final answers

Session

Verified c402f15 with a clean checkout and green current-head CI. After preparing generated files, 44 focused tests passed; scoped vp check and drizzle-kit check passed. No actionable review findings or source repairs remain. Reconfirmed ViteHub #2864 is Draft, so the required upstream release still blocks completion.

@vite-hub

vite-hub Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

New pull request evidence is queued.

@vite-hub

vite-hub Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

New pull request evidence is queued.

@vite-hub

vite-hub Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

New pull request evidence is queued.

@vite-hub

vite-hub Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor
Session Status Started Duration
View session Starting Not started —

Queued

Waiting for a worker slot.

@vite-hub

vite-hub Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

New pull request evidence is queued.

@vite-hub

vite-hub Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

New pull request evidence is queued.

@vite-hub

vite-hub Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

New pull request evidence is queued.

@vite-hub

vite-hub Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

New pull request evidence is queued.

@vite-hub

vite-hub Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

New pull request evidence is queued.

@vite-hub

vite-hub Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

New pull request evidence is queued.

@vite-hub

vite-hub Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

New pull request evidence is queued.

@vite-hub

vite-hub Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

This Agent activity was superseded by a newer managed comment.

@vite-hub

vite-hub Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

The complete ViteHub Comments stack, including #2864, is now merged. The release prerequisite remains unmet: npm still lists vite-hub@0.0.4 as the latest release, and its published package has none of the ./comments, ./comments/runtime, or ./comments/database exports this PR imports. Publish a ViteHub release containing the merged stack, then comment here when it is available so Drop can replace the preview pin.

@onmax
onmax marked this pull request as ready for review November 1, 2026 10:25
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T10:27:08.655320Z 5ea0170 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Important

The feature path is coherent, but the migration metadata and upgrade coverage can produce broken future migrations or fail an older preview database during startup.

Reviewed changes across the Comments overlay integration, Console authorization, OAuth MCP wrappers, ViteHub dependency pin, schema registration, migration history, and focused tests.

  • Admin page comments — installs ViteHub Comments for Console-authorized admins while leaving ordinary page responses unchanged outside comment mode.
  • Agent comment workflow — exposes list, read, reply, and resolve tools through Drop's /mcp, with an effective admin-role gate followed by ViteHub's Comments policy.
  • Database schema — adds the two ViteHub Comments tables to Drizzle generation and attempts to preserve data across historical preview migration timestamps and filenames.
  • Dependency integration — advances the ViteHub preview stack and retains Drop's lazy Nitro route patch.
  • Verification — focused migration and MCP tests pass, as does drizzle-kit check; the upgrade-state gaps are not represented by those passing cases.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-5.6-sol | 𝕏

Comment thread test/deploy/migrate-d1.test.mjs Resolved
@vite-hub

vite-hub Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Pullfrog’s old-preview upgrade finding, P1, is declined as inherited and outside this PR: applying the genuine fc05b66 schema and ledger (1792221635566, 1792593042706, 1792997514331) then running Drizzle reproduces table account already exists on both 5ea0170 and exact base 7c33833; their consolidated baseline SQL is identical, and restoring main’s pre-squash schema conversion would widen this Comments PR, so the repair keeps that baseline and makes the test’s supported upgrade scope explicit.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes since the prior Pullfrog review, covering the released dependency transition and migration metadata repair.

  • Pinned the released Comments stack — replaced the preview ViteHub build with vite-hub@0.1.0 and refreshed the lockfile to its released package graph.
  • Aligned the release schema — registered scope-counter and forge-link tables, added their migration, and seeded counters from existing thread numbers.
  • Rebuilt migration snapshots — made the final snapshot include the earlier comment-suggestion and consolidated-baseline columns, preventing future generation from recreating applied schema changes.
  • Narrowed upgrade coverage explicitly — tests now cover fresh databases and preview databases derived from the current consolidated baseline while preserving existing comment rows and counters.
  • Validated focused paths — the 40 migration, MCP, and Console tests pass, and drizzle-kit check reports consistent metadata.

Pullfrog  | View workflow run | Using gpt-5.6-sol | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes since the prior Pullfrog review, covering the Better Auth dependency alignment.

  • Unified the OAuth provider graph — forced ViteHub and Drop onto @better-auth/oauth-provider@1.7.10, removing the parallel 1.7.7 provider and @better-auth/utils@0.4.2 graph.
  • Regenerated the lockfile — resolved ViteHub, Better Auth adapters, Stripe, and the app against one @better-auth/core@1.7.10 and @better-auth/utils@0.5.0 type/runtime surface.
  • Validated affected paths — dependency inspection reports one version of each aligned package, the 36 focused MCP and Console authorization tests pass, and Nuxt typechecking passes.

Pullfrog  | View workflow run | Using gpt-5.6-sol | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes since the prior Pullfrog review, covering the new security-rule exceptions for ViteHub page-tool discovery.

  • Scoped Doctor suppressions — exempted only ViteHub's bundled page-session dispatcher and its generated Comments re-export from the route-middleware security rule.
  • Verified authorization boundaries — confirmed the shared dispatcher filters every tool through its allowed callback, Console uses consoleAllowsRequest, and Comments resolves the Console-backed identity before applying its read policy.
  • Validated the configuration — pnpm run doctor passes with no blockers, errors, warnings, or informational findings.

Pullfrog  | View workflow run | Using gpt-5.6-sol | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes since the prior Pullfrog review, covering the generated-root tests' transition to the released ViteHub APIs.

  • Updated Rate Limit setup coverage — awaited the released async config hook and retained assertions that generated files and Nitro plugins live at the project root.
  • Replaced obsolete Content handler coverage — removed checks for the retired per-definition dev handler and now verifies project-root definition discovery, operation loading, and the no-definition case.
  • Validated the focused suite — pnpm test -- test/deploy/generated-roots.test.mjs passes all 5 tests against vite-hub@0.1.0.

Pullfrog  | View workflow run | Using gpt-5.6-sol | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes since the prior Pullfrog review, covering the Nitro virtual-handler build fix and the two main-branch commits incorporated into the updated head.

  • Preserved virtual MCP discovery — kept handler IDs registered in nitroOptions.virtual unchanged during Nitro path resolution, while retaining normal project-root resolution for filesystem handlers.
  • Added focused regression coverage — verified ViteHub's delegated Console MCP middleware remains linked to its virtual module under the Cloudflare Durable preset.
  • Validated the production seam — the focused virtual-handler test and full pnpm build pass, and the generated server bundle contains virtual:vitehub/console-mcp-discovery.
  • Absorbed current main — incorporated the video-stage and localized frontmatter-date changes without altering the PR-specific Comments behavior.

Pullfrog  | View workflow run | Using gpt-5.6-sol | 𝕏

@vite-hub
vite-hub Bot merged commit 78d77f7 into main Nov 1, 2026
2 checks passed
vite-hub Bot pushed a commit that referenced this pull request Nov 1, 2026
…longer holds a placeholder D1 id (#104)

ViteHub 0.1.0 (#63) refuses a D1 binding declared twice with different ids. Nitro merges the root
wrangler.jsonc into the generated config, so on Workers Builds the placeholder id clashed with
CLOUDFLARE_D1_DATABASE_ID and the build failed. Without an id there, Wrangler provisions the
database by name, as it already does for KV.
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