Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Sep 17, 2025

Revert PR #279 to test instrumentation hook fix

Summary

This PR reverts commit a61babf (PR #279 "chat prototype") to test if it resolves the Cloudflare Workers instrumentation hook error affecting agentuity.dev.

⚠️ CRITICAL DEPLOYMENT NOTE: During investigation, I discovered that agentuity.dev is actually deployed from the website-cf repository, not the docs repository. This means this revert may not fix the live site error unless the docs content is somehow incorporated into the website-cf deployment.

The revert removes:

  • Complete chat system (app/chat/ with 15+ components)
  • Agent-pulse functionality and configuration
  • Tutorial system (API routes, state management, Dynamic Island UI)
  • KV store integration and middleware
  • Dependencies: uuid, swr, allotment, node-pty, etc.

Review & Testing Checklist for Human

  • Verify deployment architecture: Confirm whether this docs repo revert actually affects the live agentuity.dev site
  • Test instrumentation error: Check if https://agentuity.dev/Introduction loads without "Server failed to respond" error
  • Test docs functionality: Ensure basic documentation browsing still works locally (npm run dev)
  • Review removed functionality: Confirm that no critical features beyond chat/tutorial system were accidentally reverted

Notes

  • This revert removes 69 files with 4960 insertions and 9649 deletions - very large scope
  • The original instrumentation hook error may have different root cause if deployment comes from website-cf
  • User suspected PR Seng/chat prototype #279 introduced the error, but deployment architecture suggests the fix might need to be in website-cf repo instead

Link to Devin run: https://app.devin.ai/sessions/fa7202af4b6245d9b785fd8aafddb7e9
Requested by: @afterrburn

Summary by CodeRabbit

  • New Features
    • Environment config now supports AGENT_FULL_URL or AGENT_BASE_URL + AGENT_ID (replacing AGENT_QA_ID).
  • Bug Fixes
    • Adjusted doc-qa prompt rules; added logging of rephrased queries.
  • Refactor
    • Removed CodeFromFiles MDX component and mapping.
    • Middleware simplifies behavior to only redirect known error codes.
  • Style
    • Removed custom “Agentuity-Inspired” theme styles.
  • Documentation
    • Pruned internal agent/tutorial docs and Dynamic Island README.
  • Chores
    • Deprecated/removed chat UI, tutorial UI, and all related API routes.
    • Removed agent “pulse” and associated tooling.
    • .gitignore no longer ignores root .env.
    • Dependency updates (notably Next/React version changes).

@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 17, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This PR removes the chat experience, Pulse agent, tutorials APIs, Dynamic Island UI, KV/validation utilities, and related types/components. It updates env handling to unify AGENT_ID and support AGENT_FULL_URL, adjusts doc-qa prompts/logging, allows root .env tracking, trims CSS, and updates dependencies.

Changes

Cohort / File(s) Summary
Agent Pulse removal
agent-docs/agentuity.yaml, agent-docs/src/agents/agent-pulse/*, agent-docs/src/agents/agent-pulse/...
Removes the agent-pulse definition, handler, tools, state, streaming, request parsing/types, tutorial client, and related README/context builders.
Doc-QA prompt tweaks
agent-docs/src/agents/doc-qa/prompt.ts, agent-docs/src/agents/doc-qa/rag.ts
Adds a console.log for the rephrased query and reformats/edits system prompt rules; no API changes.
Sessions and tutorials API removal
app/api/sessions/*, app/api/sessions/[sessionId]/*, app/api/tutorials/*, app/api/tutorials/[id]/*, app/api/users/tutorial-state/route.ts
Deletes all session CRUD/streaming endpoints, tutorial listing/step endpoints, and user tutorial state endpoints.
Chat UI removal
app/chat/*, app/chat/components/*, app/chat/utils/*
Removes chat pages, layout, context, streaming hooks, input/message components, code editor/blocks, sidebar, skeletons, and types/services.
Dynamic Island removal
components/DynamicIsland/*
Deletes Dynamic Island components, types, hook, utilities, README, and index re-exports.
Code rendering/components
components/CodeFromFiles.tsx, app/(docs)/[[...slug]]/page.tsx, app/chat/components/MarkdownRenderer.tsx, app/chat/components/CodeBlock.tsx
Removes server-side code snippet loader and MDX mapping for CodeFromFiles; deletes markdown/code-block renderers.
Tutorial library removal
lib/tutorial/*
Removes tutorial readers, state manager, types, aggregator exports, and all-tutorials reader.
Storage/validation/config
lib/kv-store.ts, lib/validation/middleware.ts, lib/config.ts, middleware.ts, lib/env.ts
Deletes KV client and validation middleware; empties config; simplifies middleware to only error redirects; revamps env to support AGENT_FULL_URL and AGENT_ID.
Env and repo housekeeping
.env.example, .gitignore, .cursor/rules/*, agent-docs/package.json, app/global.css
Unifies AGENT_ID, adds optional AGENT_FULL_URL, stops ignoring root .env, trims internal docs, adds newline, removes custom theme CSS.
Dependencies
package.json
Adjusts dependencies/versions (remove swr/zod/uuid/allotment/etc., downgrade next/react, add cmdk); adds override for gray-matter’s js-yaml.

Sequence Diagram(s)

sequenceDiagram
  participant App
  participant Env as lib/env.getAgentConfig

  App->>Env: getAgentConfig()
  alt AGENT_FULL_URL provided
    Env-->>App: { url: AGENT_FULL_URL, bearerToken? }
  else AGENT_BASE_URL + AGENT_ID provided
    Env-->>App: { url: AGENT_BASE_URL + "/v1/agents/" + AGENT_ID, bearerToken? }
  else Missing required envs
    Env-->>App: throw Error("Provide AGENT_FULL_URL or AGENT_BASE_URL + AGENT_ID")
  end
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120+ minutes

Possibly related PRs

Suggested reviewers

  • jhaynie
  • mcongrove
  • rblalock
  • afterrburn

Poem

I tidied the burrow, swept tunnels clean,
Packed away Pulse and the chatty machine.
One agent address, neat as a bean,
Docs whisper softly, prompts now seen.
Fewer paths, lighter hops—so serene.
— A happy rabbit, shipping unseen 🐇✨

✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch devin/1726578413-revert-chat-prototype-pr279

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a61babf and 6ce16e6.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (68)
  • .cursor/rules/overview.mdc (1 hunks)
  • .cursor/rules/tutorials-structure.mdc (0 hunks)
  • .env.example (1 hunks)
  • .gitignore (0 hunks)
  • agent-docs/agentuity.yaml (0 hunks)
  • agent-docs/package.json (1 hunks)
  • agent-docs/src/agents/agent-pulse/README.md (0 hunks)
  • agent-docs/src/agents/agent-pulse/context/builder.ts (0 hunks)
  • agent-docs/src/agents/agent-pulse/index.ts (0 hunks)
  • agent-docs/src/agents/agent-pulse/request/parser.ts (0 hunks)
  • agent-docs/src/agents/agent-pulse/request/types.ts (0 hunks)
  • agent-docs/src/agents/agent-pulse/state.ts (0 hunks)
  • agent-docs/src/agents/agent-pulse/state/manager.ts (0 hunks)
  • agent-docs/src/agents/agent-pulse/streaming/processor.ts (0 hunks)
  • agent-docs/src/agents/agent-pulse/streaming/types.ts (0 hunks)
  • agent-docs/src/agents/agent-pulse/tools.ts (0 hunks)
  • agent-docs/src/agents/agent-pulse/tutorial.ts (0 hunks)
  • agent-docs/src/agents/doc-qa/prompt.ts (1 hunks)
  • agent-docs/src/agents/doc-qa/rag.ts (2 hunks)
  • app/(docs)/[[...slug]]/page.tsx (0 hunks)
  • app/api/sessions/[sessionId]/messages/route.ts (0 hunks)
  • app/api/sessions/[sessionId]/route.ts (0 hunks)
  • app/api/sessions/route.ts (0 hunks)
  • app/api/tutorials/[id]/route.ts (0 hunks)
  • app/api/tutorials/[id]/steps/[stepNumber]/route.ts (0 hunks)
  • app/api/tutorials/route.ts (0 hunks)
  • app/api/users/tutorial-state/route.ts (0 hunks)
  • app/chat/SessionContext.tsx (0 hunks)
  • app/chat/[sessionId]/page.tsx (0 hunks)
  • app/chat/components/ChatInput.tsx (0 hunks)
  • app/chat/components/ChatMessage.tsx (0 hunks)
  • app/chat/components/ChatMessagesArea.tsx (0 hunks)
  • app/chat/components/CodeBlock.tsx (0 hunks)
  • app/chat/components/CodeEditor.tsx (0 hunks)
  • app/chat/components/MarkdownRenderer.tsx (0 hunks)
  • app/chat/components/SessionSidebar.tsx (0 hunks)
  • app/chat/components/SessionSidebarSkeleton.tsx (0 hunks)
  • app/chat/components/TutorialFileChip.tsx (0 hunks)
  • app/chat/layout.tsx (0 hunks)
  • app/chat/page.tsx (0 hunks)
  • app/chat/services/sessionService.ts (0 hunks)
  • app/chat/types.ts (0 hunks)
  • app/chat/utils/dateUtils.ts (0 hunks)
  • app/chat/utils/useAutoResize.ts (0 hunks)
  • app/chat/utils/useStreaming.ts (0 hunks)
  • app/global.css (0 hunks)
  • components/CodeFromFiles.tsx (0 hunks)
  • components/DynamicIsland/CompactView.tsx (0 hunks)
  • components/DynamicIsland/DynamicIsland.tsx (0 hunks)
  • components/DynamicIsland/ExpandedView.tsx (0 hunks)
  • components/DynamicIsland/IslandWrapper.tsx (0 hunks)
  • components/DynamicIsland/README.md (0 hunks)
  • components/DynamicIsland/index.ts (0 hunks)
  • components/DynamicIsland/types.ts (0 hunks)
  • components/DynamicIsland/useTutorial.ts (0 hunks)
  • components/DynamicIsland/utils.ts (0 hunks)
  • components/ui/skeleton.tsx (0 hunks)
  • lib/config.ts (0 hunks)
  • lib/env.ts (1 hunks)
  • lib/kv-store.ts (0 hunks)
  • lib/tutorial/all-tutorials-reader.ts (0 hunks)
  • lib/tutorial/index.ts (0 hunks)
  • lib/tutorial/state-manager.ts (0 hunks)
  • lib/tutorial/tutorial-reader.ts (0 hunks)
  • lib/tutorial/types.ts (0 hunks)
  • lib/validation/middleware.ts (0 hunks)
  • middleware.ts (1 hunks)
  • package.json (3 hunks)

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages
Copy link

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
docs 6ce16e6 Sep 17 2025, 01:41 PM

@afterrburn afterrburn merged commit a2b21b2 into main Sep 17, 2025
1 of 2 checks passed
@afterrburn afterrburn deleted the devin/1726578413-revert-chat-prototype-pr279 branch September 17, 2025 13:42
This was referenced Sep 20, 2025
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.

2 participants