From 8a880b2996223c947f8ef16c7852ef027702a5fa Mon Sep 17 00:00:00 2001 From: Tim O'Farrell Date: Fri, 1 May 2026 11:38:57 -0600 Subject: [PATCH] docs: fix stale and inaccurate markdown documentation (#14256) Co-authored-by: openhands --- .openhands/microagents/glossary.md | 2 +- Development.md | 2 +- enterprise/doc/architecture/README.md | 2 +- frontend/README.md | 20 ++++++--------- .../manage-organization-members.test.tsx | 25 ++++++++----------- openhands/app_server/README.md | 2 +- skills/README.md | 16 ++++++------ 7 files changed, 31 insertions(+), 38 deletions(-) diff --git a/.openhands/microagents/glossary.md b/.openhands/microagents/glossary.md index 66b5655086..2c1e8fe827 100644 --- a/.openhands/microagents/glossary.md +++ b/.openhands/microagents/glossary.md @@ -121,7 +121,7 @@ A specialized prompt that enhances OpenHands with domain-specific knowledge, rep A central repository of available microagents and their configurations. #### Public Microagent -A general-purpose microagent available to all OpenHands users, triggered by specific keywords. Located in `microagents/`. +A general-purpose microagent available to all OpenHands users, triggered by specific keywords. Located in `skills/`. #### Repository Microagent A type of microagent that provides repository-specific context and guidelines, stored in the `.openhands/microagents/` directory. diff --git a/Development.md b/Development.md index 9d8e18d72c..0de4fbfc8e 100644 --- a/Development.md +++ b/Development.md @@ -50,7 +50,7 @@ make setup-config ``` **Note on Alternative Models:** -See [our documentation](https://docs.openhands.dev/usage/llms) for recommended models. +See [our documentation](https://docs.openhands.dev/openhands/usage/llms/llms) for recommended models. ### 4. Run the Application diff --git a/enterprise/doc/architecture/README.md b/enterprise/doc/architecture/README.md index 47d0217e71..f7a526129a 100644 --- a/enterprise/doc/architecture/README.md +++ b/enterprise/doc/architecture/README.md @@ -10,4 +10,4 @@ Architecture diagrams specific to the OpenHands SaaS/Enterprise deployment. ## Related Documentation For core OpenHands architecture (applicable to all deployments), see: -- [Core Architecture Documentation](../../../openhands/architecture/README.md) +- [Architecture Documentation](https://docs.openhands.dev/openhands/usage/architecture/backend) diff --git a/frontend/README.md b/frontend/README.md index 0ab14b8528..18d62720be 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -222,15 +222,15 @@ describe("ComponentName", () => { For real-world examples of testing, check out these test files: -1. **Chat Input Component Test**: - [`__tests__/components/chat/chat-input.test.tsx`](https://github.com/OpenHands/OpenHands/blob/main/frontend/__tests__/components/chat/chat-input.test.tsx) - - Demonstrates comprehensive testing of a complex input component - - Covers various scenarios like submission, disabled states, and user interactions +1. **Chat Interface Component Test**: + [`__tests__/components/chat/chat-interface.test.tsx`](https://github.com/OpenHands/OpenHands/blob/main/frontend/__tests__/components/chat/chat-interface.test.tsx) + - Demonstrates comprehensive testing of a complex chat component + - Covers various scenarios like message rendering and user interactions -2. **File Explorer Component Test**: - [`__tests__/components/file-explorer/file-explorer.test.tsx`](https://github.com/OpenHands/OpenHands/blob/main/frontend/__tests__/components/file-explorer/file-explorer.test.tsx) - - Shows testing of a more complex component with multiple interactions - - Illustrates testing of nested components and state management +2. **Interactive Chat Box Component Test**: + [`__tests__/components/interactive-chat-box.test.tsx`](https://github.com/OpenHands/OpenHands/blob/main/frontend/__tests__/components/interactive-chat-box.test.tsx) + - Shows testing of a more complex input component with multiple interactions + - Illustrates testing of user input handling and state management ### Test Coverage @@ -248,7 +248,3 @@ Tests are automatically run during: ## Contributing Please read the [CONTRIBUTING.md](../CONTRIBUTING.md) file for details on our code of conduct, and the process for submitting pull requests to us. - -## Troubleshooting - -TODO diff --git a/frontend/__tests__/routes/manage-organization-members.test.tsx b/frontend/__tests__/routes/manage-organization-members.test.tsx index 865ffce70e..d79d263fac 100644 --- a/frontend/__tests__/routes/manage-organization-members.test.tsx +++ b/frontend/__tests__/routes/manage-organization-members.test.tsx @@ -712,7 +712,7 @@ describe("Manage Organization Members Route", () => { }, ); - it("should not show invite button when user lacks canInviteUsers permission (User role)", async () => { + it("should redirect user when they lack canInviteUsers permission (Member role)", async () => { const userData = { org_id: "1", user_id: "1", @@ -725,24 +725,21 @@ describe("Manage Organization Members Route", () => { status: "active" as const, }; - // Set mock and remove cached query before rendering + // Set mock for member role user getMeSpy.mockResolvedValue(userData); - // Remove any cached "me" queries so fresh data is fetched - queryClient.removeQueries({ queryKey: ["organizations"] }); + // Also set the mockQueryClient used by clientLoader + mockQueryClient.setQueryData(["organizations", "1", "me"], userData); - await setupTestWithOrg(0); + renderManageOrganizationMembers(); - // Directly set the query data to force component re-render with user role - // This ensures the component uses the user role data instead of cached admin data - queryClient.setQueryData(["organizations", "1", "me"], userData); - - // Wait for the component to update with the new query data + // Member role users cannot access org-members page - they get redirected + // The clientLoader redirects users without invite_user_to_organization permission + // So the manage-organization-members-settings element should not be present await waitFor( () => { - const inviteButton = screen.queryByRole("button", { - name: /ORG\$INVITE_ORG_MEMBERS/i, - }); - expect(inviteButton).not.toBeInTheDocument(); + expect( + screen.queryByTestId("manage-organization-members-settings"), + ).not.toBeInTheDocument(); }, { timeout: 3000 }, ); diff --git a/openhands/app_server/README.md b/openhands/app_server/README.md index 968a2d8030..00b731a81c 100644 --- a/openhands/app_server/README.md +++ b/openhands/app_server/README.md @@ -4,7 +4,7 @@ FastAPI-based application server that provides REST API endpoints for OpenHands ## Overview -As of 2025-09-29, much of the code in the OpenHands repository can be regarded as legacy, having been superseded by the code in AgentSDK. This package provides endpoints to interface with the new agent SDK and bridge the gap with the existing OpenHands project. +This package provides server and sandbox functionality to interact with the OpenHands Software Agent SDK. It exposes REST API endpoints for managing conversations, sandboxes, events, and user settings. ## Architecture diff --git a/skills/README.md b/skills/README.md index f819415e70..cb763fee63 100644 --- a/skills/README.md +++ b/skills/README.md @@ -28,13 +28,13 @@ Directory structure: ``` OpenHands/skills/ ├── # Keyword-triggered expertise -│ ├── git.md # Git operations -│ ├── testing.md # Testing practices -│ └── docker.md # Docker guidelines -└── # These skills/microagents are always loaded - ├── pr_review.md # PR review process - ├── bug_fix.md # Bug fixing workflow - └── feature.md # Feature implementation +│ ├── github.md # GitHub operations and API usage +│ ├── docker.md # Docker guidelines +│ └── kubernetes.md # Kubernetes setup and management +└── # Other skills + ├── code-review.md # Code review process + ├── security.md # Security best practices + └── ssh.md # SSH connections and configuration ``` ### 2. Repository Instructions (Private) @@ -107,7 +107,7 @@ Key features: - **Always active**: Automatically loaded for the repository - **Locally maintained**: Updated with the project -You can see an example of a repo agent in [the agent for the OpenHands repo itself](https://github.com/OpenHands/OpenHands/blob/main/.openhands/microagents/repo.md). +You can see an example of a repo agent in [the glossary for the OpenHands repo](https://github.com/OpenHands/OpenHands/blob/main/.openhands/microagents/glossary.md). ## Contributing