Skip to content

fix scheduled import empty path handling - #632

Open
charliecai wants to merge 2 commits into
nashsu:mainfrom
charliecai:agent/fix-scheduled-import-path
Open

fix scheduled import empty path handling#632
charliecai wants to merge 2 commits into
nashsu:mainfrom
charliecai:agent/fix-scheduled-import-path

Conversation

@charliecai

@charliecai charliecai commented Aug 2, 2026

Copy link
Copy Markdown

Summary

  • keep an empty scheduled-import path empty in the settings draft instead of displaying and persisting <project>/raw/sources
  • initialize and hydrate newly opened projects with an empty path when no saved configuration exists
  • clear project-managed paths left behind by older releases while retaining valid external selections
  • make resolveImportPath() preserve empty values rather than interpreting them as raw/sources
  • validate the whole project boundary, with distinct feedback for paths inside the project and paths that contain the project
  • require a valid external directory before an enabled scheduled import configuration can be saved
  • add English and Chinese copy plus regression coverage for empty, nested, parent, root, and external paths

Root cause

Both the settings draft and the project-opening flow replaced an empty scheduled-import path with <project>/raw/sources. The asynchronous hydration step only overwrote that value when a saved configuration existed, so a project without one retained the internal default. Saving unrelated settings or switching projects could then persist it. Separately, the runtime resolver also treated an empty path as raw/sources.

The previous managed-path check only covered selected project subdirectories, so an arbitrary path such as <project>/inbox was not rejected even though it is still inside the project.

User impact

Users with no scheduled-import directory configured now keep an empty store value and see an empty field prompting them to choose an external directory. Existing project-managed values are cleared during hydration and on the next settings save. Enabled configurations cannot be saved with a missing or self-referential path, and the UI explains whether the selected directory is inside the project or contains it.

Validation

  • npm run test:mocks (118 files, 1739 tests)
  • npm run build

@charliecai
charliecai marked this pull request as ready for review August 2, 2026 08:47
@charliecai charliecai changed the title fix scheduled import empty path handling feat: support multiple scheduled import directories Aug 2, 2026
@charliecai
charliecai force-pushed the agent/fix-scheduled-import-path branch from 9bbac70 to 4129b64 Compare August 2, 2026 08:52
@charliecai charliecai changed the title feat: support multiple scheduled import directories fix scheduled import empty path handling Aug 2, 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