Skip to content

Conversation

gus-costa
Copy link

@gus-costa gus-costa commented Aug 10, 2025

Overview

Implements a complete connector for Outline, a collaborative knowledge base platform. Supports both self-hosted and cloud-hosted instances with full indexing of Collections and Documents.

Key Features

  • ✅ Load and Poll connector interfaces for full and incremental indexing
  • ✅ RPC-style API client with Bearer token authentication
  • ✅ Comprehensive error handling and rate limiting
  • ✅ Full frontend integration with custom icon and UI forms
  • ✅ Extensive test suite (unit, integration)

Configuration

Users provide:

  • Base URL: Outline instance URL (e.g., https://company.getoutline.com)
  • API Token: Valid API token with read permissions

Testing

Integration tests require environment variables:

export OUTLINE_BASE_URL="https://your-outline-instance.com"
export OUTLINE_API_TOKEN="your-api-token-here"
pytest tests/daily/connectors/outline/test_outline_basic.py

Getting API Credentials

  1. Outline instance → Preferences → API & Apps
  2. Create new API token
  3. Ensure read permissions (collections.list, documents.list)

Quality Assurance

  • All linting/formatting checks pass (ruff, black, mypy)
  • Follows existing connector patterns (BookStack-style)
  • Full TypeScript integration
  • Comprehensive test coverage

Demo

outline-connector.webm

Documentation

Related Issues

/fix #3256
/claim #3256


Summary by cubic

Added a new connector for Outline knowledge base, supporting both self-hosted and cloud-hosted instances with full indexing and incremental polling of collections and documents.

  • New Features
    • Outline connector with API client, error handling, and validation.
    • Frontend integration with custom icon, credential forms, and Wiki categorization.
    • Full test suite for connector and API client.

- Add complete Outline connector with API client and connector implementation
- Support both self-hosted and cloud-hosted Outline instances
- Implement full indexing and incremental polling functionality
- Add comprehensive error handling and validation
- Include extensive unit and integration tests
- Add improved docstrings for API documentation
Add complete frontend support for Outline knowledge base connector:

**Frontend Components:**
- Add Outline to ValidSources enum and type system
- Create custom Outline SVG icon with brand colors
- Add OutlineIcon React component following existing patterns
- Configure source metadata for Wiki category with documentation link
- Add credential configuration for base URL and API token
- Add connector configuration interface

**Integration Features:**
- Full TypeScript support with OutlineCredentialJson interface
- Consistent styling and branding with other connectors
- Standard credential form for URL and API token input
- Source categorization as Wiki

The frontend now supports creating and configuring Outline connectors
through the standard Onyx connector creation flow.
@gus-costa gus-costa requested a review from a team as a code owner August 10, 2025 22:50
Copy link

vercel bot commented Aug 10, 2025

@gus-costa is attempting to deploy a commit to the Danswer Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Summary

This PR implements a complete Outline Knowledge Base connector that enables Onyx to index and search content from Outline collaborative documentation platforms. The implementation follows the established connector architecture with both LoadConnector and PollConnector interfaces, supporting full indexing and incremental updates.

The connector consists of several key components:

  • Backend Integration: Adds OUTLINE to the DocumentSource enum and connector factory mapping
  • API Client: Implements OutlineApiClient with RPC-style API communication, Bearer token authentication, comprehensive error handling, and automatic retry logic with exponential backoff
  • Connector Implementation: OutlineConnector class handles document processing, pagination, time-range filtering for polling, and converts both Outline collections and documents into searchable Onyx documents
  • Frontend Integration: Complete UI support including OutlineIcon component, SOURCE_METADATA_MAP entry, credential forms, and TypeScript interfaces
  • Test Coverage: Comprehensive unit tests for the API client and connector, plus integration tests requiring real Outline credentials

The implementation follows established patterns from similar connectors like BookStack and GitHub, with proper separation of concerns between the HTTP client layer and document processing logic. The connector supports both self-hosted and cloud-hosted Outline instances, handles rate limiting gracefully, and provides detailed error messages for troubleshooting.

Confidence score: 4/5

  • This PR is generally safe to merge with minor concerns about error handling specificity in tests
  • Score reflects comprehensive implementation following established patterns, but some test logic could be more robust
  • Pay close attention to test files that use broad exception handling and integration test reliability

15 files reviewed, 7 comments

Edit Code Review Bot Settings | Greptile

Resolve all issues identified in code review:

**URL Validation Improvements:**
- Enhanced URL validation to reject invalid domain structures
- Added explicit check for domains requiring dots (except localhost)
- Fixed test to validate URL structure rather than network connectivity
- Reduced test execution time from ~14s to ~7s by eliminating unnecessary network attempts

**Error Handling Fixes:**
- Updated JSON decode error handling to catch specific requests.JSONDecodeError
- Fixed unsafe getattr usage with proper null checking to prevent malformed URLs
- Added proper validation in URL building methods

**Test Quality Improvements:**
- Fixed contradictory test comments to match actual behavior
- Replaced problematic generator equality comparisons with proper iterable checks
- Removed unnecessary infinite loop safety checks by fixing mock configuration
- Updated tests to mock outline_client properly for isolated unit testing

**Code Quality:**
- Fixed all linting issues
- All type checking passes without issues
- Improved error messages for better user experience

All tests pass and the connector now handles edge cases more robustly
while providing clearer feedback for configuration errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Outline KB connector (getoutline.com)
1 participant