Skip to content

BACK-478/479/480/419/423 - Web UI i18n support, documentation editing with path autocomplete, milestone search fix, and demote-to-draft action, Add folder grouping for docs#655

Open
kuwork wants to merge 17 commits into
MrLesk:mainfrom
kuwork:i18n

Conversation

@kuwork
Copy link
Copy Markdown
Contributor

@kuwork kuwork commented May 21, 2026

Summary

BACK-478 — Add Web UI i18n support (English, Japanese, Chinese Simplified/Traditional):

  • src/web/contexts/I18nContext.tsx: create React context for locale state management with config-driven initialization via apiClient.fetchConfig()
  • src/web/hooks/useI18n.ts: convenience hook exposing the t translation dictionary
  • src/web/locales/index.ts: locale registry and dictionary loader supporting en, ja, zh-CN, zh-TW
  • src/web/locales/types.ts: recursive TranslationDict type derived from the English source dictionary
  • src/web/locales/en.ts, ja.ts, zh-CN.ts, zh-TW.ts: full translation dictionaries covering all 30+ UI components
  • src/web/App.tsx & src/web/main.tsx: integrate I18nProvider and sync locale from backlog/config.yml
  • src/web/components/*.tsx: replace all hardcoded UI strings with t.* translations across Board, TaskDetailsModal, MilestonesPage, Settings, WikiDetail, CleanupModal, etc.
  • src/core/backlog.ts, src/types/index.ts, src/file-system/operations.ts: add locale field to BacklogConfig and persist it to config file
  • src/test/assets.test.ts: update test expectations for i18n-related changes
image

BACK-479 — Add full documentation editing with path autocomplete for references and documentation:

  • src/file-system/operations.ts: add listProjectFiles() (secure directory listing with path traversal containment check) and searchProjectFiles() (recursive project file search excluding node_modules, .git, dist, build, .backlog, .locks)
  • src/server/index.ts: add GET /api/list-files and GET /api/search-files endpoints; support documentation array in task update payload
  • src/web/lib/api.ts: add fetchListFiles() and fetchSearchFiles() client methods
  • src/web/components/PathAutocomplete.tsx: new reusable path autocomplete component with keyboard navigation (arrow keys + Enter), directory traversal, URL detection, debounced server search, and click-outside dismissal
  • src/web/components/TaskDetailsModal.tsx: replace read-only documentation display with fully editable list; add inline add/remove for documentation items; replace plain text inputs with PathAutocomplete for both references and documentation fields
  • src/test/filesystem.test.ts: add tests for file listing and search (path traversal rejection, missing directory handling)
image image

BACK-480 — Fix WebUI milestone page search fuzzy matching false positives:

  • src/web/components/MilestonesPage.tsx: introduce three-tier search strategy — exact ID match → substring match (title/id contains query) → Fuse fuzzy search with threshold: 0.35; this eliminates false positives on short queries; fix unassigned section to show all search results instead of filtering out completed tasks during active search
  • src/test/web-milestones-page-search.test.tsx: update tests for new three-tier search behavior
  • src/test/web-milestones-page-unassigned-filter.test.tsx: adjust unassigned filter tests for search-active display behavior

BACK-419 — Add Web UI demote-to-draft action:

  • src/server/index.ts: add POST /api/tasks/:id/demote endpoint with handleDemoteTask() leveraging core.demoteTask(); broadcast both tasks-updated and drafts-updated WebSocket events to refresh all clients
  • src/web/components/TaskDetailsModal.tsx: add "Demote to Draft" button in preview mode with keyboard shortcut D (when not in an input); integrate with i18n translation strings
  • src/web/lib/api.ts: add demoteTask(id) client API method
  • src/web/locales/en.ts, ja.ts, zh-CN.ts, zh-TW.ts: add demote-related translation keys
  • src/test/server-demote-endpoint.test.ts: add endpoint tests covering success, task not found, and lock conflict (409) scenarios
image

BACK-423 — Add folder grouping for docs in Web UI
Based on PR #655's format, here's the revised version:


BACK-423 — Add folder grouping for docs in Web UI

  • src/types/index.ts: add DocsTreeNode type for recursive docs folder tree structure
  • src/file-system/operations.ts: add getDocsTree() (filesystem walk including empty directories) and createDocsFolder() (with path traversal containment check)
  • src/server/index.ts: add GET /api/docs/tree and POST /api/docs/folder endpoints
  • src/web/lib/api.ts: add fetchDocsTree() and createDocsFolder() client methods
  • src/web/App.tsx: load docsTree in parallel with other data and pass through component tree
  • src/web/components/Layout.tsx: forward docsTree prop to SideNavigation
  • src/web/components/SideNavigation.tsx: replace flat document list with recursive DocTreeItem component; add DocActionDropdown per-folder menu (create file / create folder); add expand/collapse with localStorage persistence; fix vertical alignment of dropdown trigger buttons; remove rename option from Wiki section header dropdown
  • src/web/components/DocumentationDetail.tsx: support ?path query parameter on /documentation/new to pre-fill target folder

getDocsTree() walks the filesystem directly instead of deriving from the docs array so that empty folders are visible and can be created before any document exists inside them. Documents do not need a standalone rename action in the sidebar because saveDocument() already handles title changes by renaming the file automatically.

image

Task Checklist

  • I have created a corresponding task in backlog/tasks/
  • The task has clear acceptance criteria
  • I have added an implementation plan to the task
  • All acceptance criteria in the task are marked as completed

kuwork added 11 commits May 9, 2026 23:38
(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-478/479/480/419 - Web UI i18n support, documentation editing with path autocomplete, milestone search fix, and demote-to-draft action BACK-478/479/480/419/423 - Web UI i18n support, documentation editing with path autocomplete, milestone search fix, and demote-to-draft action, Add folder grouping for docs May 21, 2026
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