[PR #107] [MERGED] Confluence: preserve page hierarchy for tree filtering #114

Closed
opened 2026-10-18 21:14:28 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/oikb/pull/107
Author: @TobiasGoerke
Created: 8/18/2026
Status: ✅ Merged
Merged: 9/16/2026
Merged by: @tjbck

Base: main ← Head: feat/confluence-hierarchical-paths


📝 Commits (1)

  • dba1c78 Add hierarchical Confluence paths

📊 Changes

4 files changed (+300 additions, -35 deletions)

View changed files

📝 docs/guide.md (+8 -1)
📝 src/oikb/cli.py (+5 -1)
📝 src/oikb/connectors/confluence.py (+95 -33)
➕ tests/test_confluence.py (+192 -0)

📄 Description

Why

Confluence pages are currently synchronized using only their page titles. This loses the page hierarchy and makes it impossible to use existing include/exclude filters to select a page tree.

For example, users cannot reliably select only a subtree without synchronizing the entire space.

What

Add an optional hierarchical structure mode:

confluence:ABC?structure=hierarchical

In this mode, page paths include their full Confluence hierarchy:

Knowledge Base and FAQ/FAQ - Using OpenCode.txt

The root page itself is represented as:

Knowledge Base and FAQ.txt

Existing filters can select a subtree:

source: "confluence:ABC?structure=hierarchical"
filter:
  include:
    - "Knowledge Base and FAQ/**"

The default flat mode remains unchanged.
Thus, there is full backwards compatibility.

Changes

  • Add structure=hierarchical source configuration.
  • Build paths from Confluence page parentId relationships.
  • Resolve non-numeric space keys to numeric Confluence space IDs.
  • Keep page content lookup correct for hierarchical paths.
  • Reject ambiguous page paths instead of syncing the wrong page.
  • Add mocked tests for parsing, both modes, filtering, page reads, key resolution, collisions, and repeated manifest builds.
  • Update the Confluence documentation.

Verification

  • 11 tests passed.
  • Python compilation passed.
  • git diff --check passed.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/oikb/pull/107 **Author:** [@TobiasGoerke](https://github.com/TobiasGoerke) **Created:** 8/18/2026 **Status:** ✅ Merged **Merged:** 9/16/2026 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `main` ← **Head:** `feat/confluence-hierarchical-paths` --- ### 📝 Commits (1) - [`dba1c78`](https://github.com/open-webui/oikb/commit/dba1c787ef4ae47a22485b631718ae4b9b870fa4) Add hierarchical Confluence paths ### 📊 Changes **4 files changed** (+300 additions, -35 deletions) <details> <summary>View changed files</summary> 📝 `docs/guide.md` (+8 -1) 📝 `src/oikb/cli.py` (+5 -1) 📝 `src/oikb/connectors/confluence.py` (+95 -33) ➕ `tests/test_confluence.py` (+192 -0) </details> ### 📄 Description ## Why Confluence pages are currently synchronized using only their page titles. This loses the page hierarchy and makes it impossible to use existing include/exclude filters to select a page tree. For example, users cannot reliably select only a subtree without synchronizing the entire space. ## What Add an optional hierarchical structure mode: ```text confluence:ABC?structure=hierarchical ``` In this mode, page paths include their full Confluence hierarchy: ```text Knowledge Base and FAQ/FAQ - Using OpenCode.txt ``` The root page itself is represented as: ```text Knowledge Base and FAQ.txt ``` Existing filters can select a subtree: ```yaml source: "confluence:ABC?structure=hierarchical" filter: include: - "Knowledge Base and FAQ/**" ``` The default flat mode remains unchanged. Thus, there is **full backwards compatibility**. ## Changes - Add `structure=hierarchical` source configuration. - Build paths from Confluence page `parentId` relationships. - Resolve non-numeric space keys to numeric Confluence space IDs. - Keep page content lookup correct for hierarchical paths. - Reject ambiguous page paths instead of syncing the wrong page. - Add mocked tests for parsing, both modes, filtering, page reads, key resolution, collisions, and repeated manifest builds. - Update the Confluence documentation. ## Verification - 11 tests passed. - Python compilation passed. - `git diff --check` passed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-18 21:14:28 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
open-webui/oikb#114
No description provided.