Skip to content

chore: remove operator service refs and clarify .env.example labels#1668

Merged
larryro merged 2 commits into
mainfrom
chore/remove-operator-service
May 5, 2026
Merged

chore: remove operator service refs and clarify .env.example labels#1668
larryro merged 2 commits into
mainfrom
chore/remove-operator-service

Conversation

@larryro

@larryro larryro commented May 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Operator service cleanup. The operator service is gone from the deployment but stale code and config remained. Delete the orphan browser_operate.ts / get_operator_service_url.ts helpers (no callers — web_tool.ts only exposes fetch and search modes), strip the now-dead WebBrowserOperateResult / OperatorChatResponse types, remove the browser_operate UI branch in thinking-animation.tsx and the unused thinking.browsing translation in en/de/fr, and drop /metrics/operator from the Caddyfile and proxy README.
  • .env.example label fixes. Three misleading section headers, prompted by a user noting that OPTIONAL: Provider Secrets Encryption is actually required:
    • SOPS_AGE_KEYREQUIRED (provider decryption in convex/lib/sops.ts and the guardrails secret box in convex/lib/secret_box.ts both throw without it; tale init always generates one).
    • INSTANCE_SECRETREQUIRED (used by generate_key in services/platform/docker-entrypoint.sh to derive the Convex admin key — tale deploy fails without it).
    • Database ConfigurationREQUIRED: prefix added for label consistency (DB_PASSWORD was already documented as required inline).
  • Uncomment SOPS_AGE_KEY= to match the file's "REQUIRED → uncommented" convention. tale init still auto-fills empty values via the existing missing = requiredVars.filter(v => !existing[v]) check in tools/cli/src/lib/config/ensure-env.ts.
  • convex/_generated/api.d.ts updated by hand to drop the two stale helper imports/registry entries because the local Convex backend wasn't running for codegen — purely mechanical, identical to what bunx convex dev would produce. Will be reaffirmed on the next codegen run.

Test plan

  • npx tsc --noEmit from services/platform/ → exit 0
  • npm run lint --workspace=@tale/platform → 0 warnings, 0 errors
  • bunx convex dev regenerates _generated/api.d.ts with no diff against this branch
  • caddy validate (or a proxy container build) passes with the updated Caddyfile
  • tale init on a fresh checkout still auto-generates SOPS_AGE_KEY and INSTANCE_SECRET into .env
  • Spot-check the chat UI: a web tool invocation with mode: fetch still shows the "Reading {hostname}" thinking message

Summary by CodeRabbit

  • New Features

    • Added more granular thinking status messages for different search modes (e.g., "Searching knowledge base", "Searching multiple sources").
  • Bug Fixes

    • Removed deprecated "Browsing the web" status indicator.
  • Chores

    • Updated environment configuration requirements and removed unused Operator Service settings.
    • Updated proxy routing configuration and metrics endpoints.

…abels

Operator service is gone from the deployment but stale code/config remained.
Also fixes misleading OPTIONAL labels in .env.example that hid required vars
(SOPS_AGE_KEY, INSTANCE_SECRET) — both throw or fail deploy without them.

- Delete unused browser_operate / get_operator_service_url helpers (no callers)
- Drop WebBrowserOperateResult / OperatorChatResponse types
- Remove dead browser_operate UI branch and thinking.browsing translation
- Strip /metrics/operator from Caddyfile and proxy README
- Regenerate api.d.ts to drop the two deleted helper imports
- Re-label SOPS_AGE_KEY, INSTANCE_SECRET, and Database section as REQUIRED
@coderabbitai

coderabbitai Bot commented May 5, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This change removes the Operator Service-based browser automation feature from the platform. The removal includes the browserOperate tool implementation and its helper functions (getOperatorServiceUrl), type definitions, environment configuration for the operator service, UI components displaying browser operation status in the thinking animation, operator metrics endpoint proxying, and the "browsing" status localization strings across three language files (English, German, French).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

  • tale-project/tale#369: Directly related changes to browser_operate helper, operator service helpers and types, and web tool naming/thinking-animation status display logic
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description is comprehensive with clear summaries of both operator cleanup and .env changes, but the pre-merge checklist is incomplete with only 2 of 5 items addressed. Complete all checklist items: confirm bun run check execution, verify docs updates are N/A (or complete if needed), and confirm proxy/README changes don't require additional documentation.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: operator service reference removal and .env.example label clarification.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/remove-operator-service

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@services/proxy/README.md`:
- Line 23: The README's metrics route list was shortened incorrectly; update the
`services/proxy/README.md` metrics section to document all exposed token-gated
endpoints by adding `/metrics/platform` and `/metrics/convex` alongside the
existing `/metrics/*` note and clarifying which backends (`crawler:8002`,
`rag:8001`) they proxy to and that these routes require tokens. Mention the
exact routes `/metrics/platform` and `/metrics/convex`, their target services,
and the token-gating requirement so operators can configure scrapes correctly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: f52436f1-2d64-4391-babe-b97e10b712f4

📥 Commits

Reviewing files that changed from the base of the PR and between e510ddf and 0229f37.

⛔ Files ignored due to path filters (1)
  • services/platform/convex/_generated/api.d.ts is excluded by !**/_generated/**
📒 Files selected for processing (10)
  • .env.example
  • services/platform/app/features/chat/components/thinking-animation.tsx
  • services/platform/convex/agent_tools/web/helpers/browser_operate.ts
  • services/platform/convex/agent_tools/web/helpers/get_operator_service_url.ts
  • services/platform/convex/agent_tools/web/helpers/types.ts
  • services/platform/messages/de.json
  • services/platform/messages/en.json
  • services/platform/messages/fr.json
  • services/proxy/Caddyfile
  • services/proxy/README.md
💤 Files with no reviewable changes (7)
  • services/platform/convex/agent_tools/web/helpers/browser_operate.ts
  • services/platform/convex/agent_tools/web/helpers/get_operator_service_url.ts
  • services/platform/messages/en.json
  • services/platform/app/features/chat/components/thinking-animation.tsx
  • services/platform/messages/de.json
  • services/platform/messages/fr.json
  • services/platform/convex/agent_tools/web/helpers/types.ts

Comment thread services/proxy/README.md
- `convex:3211` — Convex HTTP actions and `/api/*` site proxy
- `convex:6791` — Convex Dashboard at `/convex-dashboard`
- `crawler:8002`, `rag:8001`, `operator:8004` — `/metrics/*` (token-gated)
- `crawler:8002`, `rag:8001` — `/metrics/*` (token-gated)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Metrics route docs are incomplete after this edit.

Line 23 now documents only crawler/rag, but the proxy still exposes /metrics/platform and /metrics/convex (token-gated). This can mislead operators configuring scrapes.

📄 Suggested doc fix
-- `crawler:8002`, `rag:8001` — `/metrics/*` (token-gated)
+- `crawler:8002`, `rag:8001`, `platform:3000` — `/metrics/*` (token-gated; includes `/metrics/platform` and `/metrics/convex`)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- `crawler:8002`, `rag:8001` `/metrics/*` (token-gated)
- `crawler:8002`, `rag:8001`, `platform:3000` `/metrics/*` (token-gated; includes `/metrics/platform` and `/metrics/convex`)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@services/proxy/README.md` at line 23, The README's metrics route list was
shortened incorrectly; update the `services/proxy/README.md` metrics section to
document all exposed token-gated endpoints by adding `/metrics/platform` and
`/metrics/convex` alongside the existing `/metrics/*` note and clarifying which
backends (`crawler:8002`, `rag:8001`) they proxy to and that these routes
require tokens. Mention the exact routes `/metrics/platform` and
`/metrics/convex`, their target services, and the token-gating requirement so
operators can configure scrapes correctly.

Multi-agent review of the branch surfaced eight orphan references
the initial removal missed: issue templates, the issue-labeler
mapping, the commitlint scope-enum, a stale .gitignore line, the
CLI README's rotatable-services list, and a leftover translation
mock entry.
@larryro larryro merged commit 27bc2d9 into main May 5, 2026
15 of 18 checks passed
@larryro larryro deleted the chore/remove-operator-service branch May 5, 2026 07:07
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