[feat] Bring existing files in through one intake: sidebar, empty states, drop anywhere - #840
Open
kumagallium wants to merge 8 commits into
Open
[feat] Bring existing files in through one intake: sidebar, empty states, drop anywhere#840kumagallium wants to merge 8 commits into
kumagallium wants to merge 8 commits into
Conversation
A single sheet with three states: a drop target that states the rule
("Markdown becomes notes, PDF/Word/images/CSV become materials"), a
progress view reusing the Markdown import look, and a report with counts
and the next three actions (search / connections / ask AI or set up AI).
Not wired into the app yet — this PR exists to agree on the component
in Storybook (Features/Intake/IntakeModal) before adding the entry points.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… hooks - collectDroppedFiles walks webkitGetAsEntry trees (readEntries until empty) - classifyIntakeFiles splits Markdown / materials / skipped (dot paths, unknown types) - runIntake imports notes then registers materials, reporting unified progress - useIntake (state machine) and useGlobalFileDrop (window drag tracking) - IntakeReceptacle extracted from IntakeModal; IntakeDropOverlay added - Report now shows a skipped count instead of silently dropping files Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…materials - runIntake marks all notes failed if importMarkdown throws and continues - afterRun errors are logged, not thrown; empty note sets skip the import - useIntake reopens the report after a run and recovers from unexpected errors - Global drop swallows drops inside the modal but outside the receptacle so the browser never navigates to the dropped file Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…states - FileSidebar: "Bring in files" next to + Note / + Memo - EmptyNoteGuide: first chip opens the intake - NoteListView: header icon opens the intake; empty list shows the receptacle; old Import files menu, hidden inputs and inline progress removed - AssetGalleryView: empty library shows the receptacle - NoteListToolbar: search input ref so the report can focus it Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… the report - importMarkdownFiles extracted from the inline NoteListView handler; images resolve against every dropped file, not just the Markdown ones - useIntake + useGlobalFileDrop mounted at the app root with the overlay - Sidebar verb, empty-note chip, note list and materials gallery open it - Report actions: search notes (focuses the list search), global graph, Composer, or AI setup when no model is configured - Closing the report opens the single new note or the note list - Unused import.* / noteList.import* keys removed Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The Import files menu is gone; the row now explains the sidebar verb, the other entry points, the notes/materials rule, and the report actions. Badge and roadmap entry follow after the release, as usual. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
Performance regressionClick to expand performance results |
Contributor
Adversarial probesClick to expand probe results |
Contributor
Migration fixturesClick to expand migration results |
Contributor
Bench delta比較できませんでした: main に bench/baseline.json がありません(この PR がベースラインを初めて追加する場合、マージ後の PR から delta が出ます) delta 表を出すには、tracked の |
…ess files Review findings: - Drops while the Composer (or any role="dialog") is open no longer start an intake behind it: the global hook is suspended and swallows the default - Files dropped while a run is in progress are queued and merged into one report instead of being discarded; closing mid-run keeps the progress - Files whose MIME type is empty are classified by extension (pdf, docx, images, audio, video) instead of being skipped - Mixed drops keep both entry-backed and plain file items - The icon chip in the empty-note guide is no longer wrapped in <kbd> - Tests for useIntake, useGlobalFileDrop and mergeOutcome Co-Authored-By: Claude Fable 5.1 <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.
何を変えたか
初回体験の起点を「新しい習慣の提案」から「手元にある資料の再利用」に寄せる。既存資料をまとめて入れる 投入口 を 1 部品として作り、今の UI の 4 つの面から同じものを開けるようにした(ようこそ画面には置かない)。
src/features/intake/IntakeModal.tsx、StorybookFeatures/Intake/IntakeModalで合意済み): 受け皿(「Markdown はノートに、PDF・Word・画像・CSV は素材になります」を 1 文で言い切り、フォルダを選ぶ 主/ファイルを選ぶ 従)→ 進行中(既存の Markdown 取り込みと同じ進捗バー)→ 復元レポート(ノート/素材/引き継いだつながり/失敗の 4 行と、ノートを検索する・つながりを見る・AI に聞く。AI 未設定なら AI を設定する)runIntake: 仕分け(Markdown → ノート、mimeToMediaTypeがother以外 → 素材、ドット始まりのパスと不明な種類 → 対象外)→ Markdown をノート化([[リンク]]2 パス解決・画像は同じフォルダの他ファイルから)→ 残りをhandleUploadAsset(重複回避込みの唯一の入口)で素材登録 → 一覧再読込。対象外は黙って捨てず件数を見せるwebkitGetAsEntryで中身を再帰的に辿る(readEntriesは空になるまで繰り返す。Chrome は 1 回 100 件で切るため)window.alert("Imported N notes")を撤去。単体 1 件なら閉じたときにそのノートを開く(従来の挙動を維持)設計上の判断
<dl>.claude/agents/design.md決定事項ログ(2026-09-04)レビュー対応(checker の指摘)
role="dialog"の自前ダイアログが開いている間のドロップは、投入口を背後で走らせず既定動作だけ止める(suspended)file.typeが空の PDF / Word / 画像などは拡張子で判定し、対象外に落とさない破壊的変更・docs
INDEX_SCHEMA_VERSION不変。素材登録は既存のhandleUploadAsset経由)materials-and-citations.md(日英)の取り込み行を投入口の説明に差し替え。Added in バッジと roadmap はリリース後に別コミット(いつもの 2 段階運用)intake.*等を追加、参照が消えたnoteList.importFiles/importMarkdown/importObsidianVault/importProgress/import.noMarkdownFiles/import.importedCountを削除Test Plan
pnpm exec tsc -p tsconfig.json --noEmitpnpm vitest run(3441 件。intake の classify / collect / runIntake / useIntake / useGlobalFileDrop の単体テストを追加)pnpm lint:depspnpm buildpnpm manual:checkgit diffにシークレット無し.obsidian/・.bak)を選択 → レポート「ノート 2 / 素材 3 / つながり 1 / 失敗 0 / 対象外 2」→ 「ノートを検索する」で一覧+検索欄フォーカス → 一覧への合成ドロップで案内オーバーレイ → 素材 2 登録 → 閉じる → チップから投入口が開くdragDropEnabled: falseなので HTML5 の drop が届く想定。webkitGetAsEntryの再帰読み取りは実機でのみ検証可能)🤖 Generated with Claude Code