Skip to content

BACK-473/474/477 - Wiki web UI with file tree navigation, wiki install command#647

Open
kuwork wants to merge 12 commits into
MrLesk:mainfrom
kuwork:wiki
Open

BACK-473/474/477 - Wiki web UI with file tree navigation, wiki install command#647
kuwork wants to merge 12 commits into
MrLesk:mainfrom
kuwork:wiki

Conversation

@kuwork
Copy link
Copy Markdown
Contributor

@kuwork kuwork commented May 9, 2026

Summary

BACK-473 — Add wiki section to web UI with file tree navigation:

  • src/types/index.ts: add WikiTreeNode and WikiPage types
  • src/file-system/operations.ts: implement getWikiTree() (recursive directory walker skipping wiki_output/) and
    eadWikiPage() (secure path resolution with containment check + frontmatter parsing)
  • src/server/index.ts: add GET /api/wiki/tree and GET /api/wiki/* handlers (multi-segment path via decodeURIComponent, matching existing /assets/* pattern)
  • src/web/lib/api.ts: add fetchWikiTree() and fetchWikiPage(path) client methods
  • src/web/App.tsx: register /wiki and /wiki/* routes
  • src/web/components/SideNavigation.tsx: add collapsible wiki file tree section below Documents with chevron toggle, wiki icon, item count, and recursive WikiTreeItem rendering
  • src/web/components/WikiDetail.tsx: create read-only markdown viewer reusing MermaidMarkdown + MDEditor preview with dark mode support, YAML frontmatter extraction for page header
  • src/test/filesystem.test.ts: add tests for wiki tree building and wiki page reading (path traversal rejection, missing file handling)
image PixPin_2026-05-10_00-32-14

BACK-474 — Add backlog wiki install CLI command:

  • src/cli.ts: register wiki command group with install subcommand (--force, --dry-run options)
  • src/commands/wiki-install.ts: core implementation with agent alias mapping (claude → .claude/skills/, codex → .codex/skills/, agents → .agents/skills/), symlink architecture with fallback to direct copy on Windows, overwrite protection, and SKILL.md frontmatter parsing for summary output
  • scripts/embed-wiki-skill.ts: build-time script scanning .codex/skills/llm-wiki-for-backlog/ and generating src/skills/embedded/llm-wiki-for-backlog.ts
  • src/skills/embedded/llm-wiki-for-backlog.ts: generated embedded skill files map for compiled binary availability
  • src/completions/helper.ts: add agent argument completions (claude, codex, agents)
  • src/guidelines/agent-guidelines.md: add new command reference
  • src/test/wiki-install.test.ts: 12 unit tests covering
    esolveAgent, installWikiSkill, dry-run, force overwrite, symlink handling, and result formatting

BACK-477 — Add wiki online editing, file change monitoring, folder-based page creation, and labels support:

  • src/file-system/operations.ts: add saveWikiPage() (writes content/title/labels frontmatter, sets updated_date), createWikiPage() (creates files with title, created_date, optional labels), createWikiFolder() (pure empty folders), renameWikiItem() (file/folder rename with path traversal checks)
  • src/core/content-store.ts: add createWikiWatcher() — recursive fs.watch() on backlog/wiki/, broadcasts "tasks" notification → WebSocket "tasks-updated" → live UI refresh
  • src/server/index.ts: add PUT /api/wiki/* (update page), POST /api/wiki (create page/folder), PATCH /api/wiki/* (rename item)
  • src/web/lib/api.ts: add updateWikiPage(), createWikiPage(), createWikiFolder(), renameWikiItem() client methods
  • src/web/App.tsx: integrate wikiTree into global state; loadAllData() fetches wiki tree in parallel with tasks/docs/decisions
  • src/web/components/WikiDetail.tsx: inline editing with Edit/Save/Cancel lifecycle; large title input + PasteAwareMDEditor; hasChanges tracking (content / title / labels); labels displayed as badges in view mode, editable via ChipInput in edit mode
  • src/web/components/SideNavigation.tsx: props-driven wiki tree; hover-reveal WikiActionDropdown on folders/files/root header; "Create file", "Create folder", "Rename" actions; folder file count; auto-navigation after create/rename
  • Frontmatter: title + created_date on creation, updated_date on every save; labels array replaces single type field for flexible categorization (consistent with task labels)
image image

Test plan

  • bun test — full suite passes
  • bunx tsc --noEmit — clean
  • bun run check . — clean
  • Wiki sidebar tree renders nested directories and .md files correctly
  • Clicking wiki file navigates to /wiki/:path and renders markdown with frontmatter hidden
  • backlog wiki install claude --dry-run previews files and symlinks without writing
  • backlog wiki install claude creates .agents/skills/llm-wiki-for-backlog/ and symlinks .claude/skills → .agents/skills

@kuwork
Copy link
Copy Markdown
Contributor Author

kuwork commented May 9, 2026

Closing to recreate with clean description

@kuwork kuwork closed this May 9, 2026
@kuwork kuwork reopened this May 9, 2026
@kuwork kuwork force-pushed the wiki branch 3 times, most recently from 6477e7d to d666c6e Compare May 10, 2026 14:49
kuwork added 9 commits May 14, 2026 00:09
(cherry picked from commit cdf34a9318650ab731ec0e2755158bd24fc7e914)
- Add .codex/skills/llm-wiki-for-backlog/ as the canonical skill source directory
  (SKILL.md, usermanual-writing-guide.md, merge.py)
- Add CRITICAL wikilink format rules: index.md tables must use [[path/to/file]]
  instead of standard Markdown links [text](path.md)
- Include wrong/correct examples for internal wiki page links
- Update AGENTS.md wiki guidelines with the same wikilink constraints
- Regenerate src/skills/embedded/llm-wiki-for-backlog.ts (3 files embedded)
…elated sections

(cherry picked from commit be8994d4715c77ad1f089bfae901de72ecd006c0)
…ning files display the file count on the right.
@kuwork kuwork changed the title BACK-473/474 - Wiki web UI with file tree navigation, wiki install command BACK-473/474/477 - Wiki web UI with file tree navigation, wiki install command May 14, 2026
@kuwork kuwork force-pushed the wiki branch 2 times, most recently from 3ed5d64 to 2693e35 Compare May 16, 2026 20:59
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