fix: macOS Unicode 正規化による重複プロジェクト防止#17
Open
sohei-t wants to merge 18 commits into
Open
Conversation
fix: Vue.js computed プロパティのundefinedエラーを修正
- init_db → get_database() に変更(存在しない関数の修正) - progress.db → progress_tracker.db に変更(ファイル名の整合性) 原因: database.py の実際の初期化関数名とファイル名が launch_app.command と一致していなかった Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add subfolder field to ParsedTopic dataclass (wbs_parser.py) - Implement recursive folder scanning in _detect_topics_from_files (scanner.py) - Update _scan_topic_files to handle subfolder paths - Add database migration for subfolder column with updated UNIQUE constraint - Add groupedTopics computed property for hierarchical display (app.js) - Implement collapsible folder sections in topic list (index.html) - Add folder expand/collapse animations (styles.css) Changes: - Scanner now recursively scans subfolders like 入門, 初級, 中級, 上級 - Topics are grouped by subfolder in the UI with progress indicators - Each folder section shows completion stats and can be expanded/collapsed - Database migration handles transition from old to new schema Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
feat: 再帰的フォルダスキャンと階層表示の実装
- Change file pattern from "starts with digit" to "contains digit-digit" (e.g., 1-1, 01-02, 2-3) - Add project detection for folders with content/ directory (not just WBS.json) - Add 'old' folder to exclusion list for both project and subfolder scanning - Update _detect_topics_from_files and _scan_topic_files methods This allows detection of files like: - advanced_1-1.html - basic_2-3.html - intro_01-01_topic.html Closes #5 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
feat: ファイル検出パターンを数値-数値形式に改善
- database.py: has_ssml, ssml_hashカラムをtopicsテーブルに追加 - scanner.py: SSMLファイル検出ロジック追加(xxx_ssml.txt形式) - scanner.py: ファイルパターンを\d+[-_]\d+に拡張(1-1と1_1両方に対応) - scanner.py: _ssmlで終わるファイルをスキップしてSSMLとTXTを分離 - api.py: has_ssmlのboolean変換を追加 - index.html: トピック詳細にSSMLインジケーター追加(紫色) SSMLはGoogle Cloud TTS用のオプショナルファイルのため、 進捗計算には影響しない(SSML=0でも進捗100%可能) Closes #7 Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
- Add publication_status column to projects table with CHECK constraint - Add migration for existing tables to add publication_status column - Update update_project_settings function to handle publication_status - Add API validation for publication_status values - Add publication status dropdown in both card and list views - Add getPublicationStatusLabel helper function for display labels - Add onPublicationStatusChange handler for auto-save Closes #10 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
feat: add publication status (free/paid/private) to projects
- Add publication_statuses table to database - Migrate from TEXT column to publication_status_id INTEGER - Add CRUD API endpoints for publication statuses - Add publication status tab in settings page - Update project dropdowns to use dynamic publication status list - Add initial data: 非公開, 無料公開, 有料公開 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
feat: add publication status master management
Remove workflow, agent, and development files that should not be public: - All CLAUDE.md, WORKFLOW_*.md, PHASE_*.md documentation - Agent configuration files (agent_config.yaml, etc.) - Development scripts (setup_*.sh, launch_*.sh, etc.) - Test files and artifacts - __pycache__ directories - Internal documentation (SPEC.md, WBS.json, etc.) - worktrees directory - images directory - src/ development tools Update .gitignore to prevent these files from being added again. The repository now only contains: - project/ folder with the actual application - README.md - LICENSE - .gitignore Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
chore: remove unnecessary files from repository
Replace the old AI Multi-Agent System Template README with proper documentation for the Training Content Progress Tracker application. - Add application overview and features - Document tech stack (FastAPI, Vue.js 3, SQLite) - Add setup and installation instructions - Document API endpoints - Add directory structure Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Show file counts as 'current/total' format - Add warning icons (⚠️ ) for incomplete files - Display missing files summary on project cards - Add 'View incomplete' shortcut button in detail view - Highlight missing files with red border and ✗ mark - Show specific missing file types for in-progress topics - Update filter labels to be more descriptive
- Add publication status dropdown filter - Include 'unset' option to filter projects without status - Filter logic in filteredProjects computed property
- Add delete_project method to database - Scanner now checks if DB projects still exist on filesystem - Automatically removes projects whose folders were deleted - Also removes projects without WBS.json or content folder
macOS filesystem returns folder names in NFD (decomposed Unicode), while user-created entries use NFC (composed). This caused the same project (e.g. "kaggle とデータ分析入門") to appear twice in the dashboard because the "デ" character has different byte representations in NFC vs NFD, bypassing SQLite's UNIQUE constraint. Normalize project names to NFC before database operations. Closes #15 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Background
macOS は日本語フォルダ名を NFD(Unicode 分解形)で返すことがある。例えば「デ」が NFC では
U+30C7(1文字)だが、NFD ではU+30C6+U+3099(テ + 濁点の2文字)になる。SQLite の UNIQUE 制約はバイト列で比較するため、NFC と NFD を別文字列として扱い、同一プロジェクトが2行表示される問題が発生した。Changes
scanner.py:import unicodedataを追加scan_project()でproject_path.nameをunicodedata.normalize('NFC', ...)で正規化Test plan
Closes #15
🤖 Generated with Claude Code