Skip to content

docs: provider_directory is documented as a whyExcluded reason, and is missing from four locales #1237

Closed

Description

@lizhengfeng101

Description

#1223 documented the new provider_directory exclusion reason in pages/src/content/docs/en/architecture.md, but not in the four localized copies. Readers of zh, ja, ko and ru see an exclusion-reason list that is missing a reason --preview can actually print. The FAQ pages were updated in all five locales; only architecture.md was missed.

Before syncing, though, the English page needs a correction — otherwise the sync copies a factual error into four more files.

Part 1: fix the English page

The new line was added to this list:

Once diffs are loaded, every file passes through whyExcluded. The function returns one of:

binary          — file is binary
user_exclude    — matched a pattern in your `exclude` list
unsupported_ext — extension is not in supported_file_types.json
default_path    — matched a built-in test-file exclude pattern
provider_directory — matched an unconditional provider directory exclusion

whyExcluded does not return provider_directory. The constant appears nowhere in internal/agent/selection.go; the reason is attached in internal/agent/preview.go, outside selectFiles entirely. The same section says so a few lines further down — "they never reach the per-file filter" — so the page currently contradicts itself.

The sentence right after the list is where this belongs:

deleted and too_large are not returned by whyExcluded; selectFiles applies them after the gates

provider_directory sits even further out than those two: deleted and too_large at least pass through selectFiles, while a provider-directory file is dropped by the diff provider before selection runs at all. Either move it out of the list into that paragraph, or drop it from the list and rely on the providerDirIgnoreDirs paragraph below, which already explains it correctly.

Also minor: the list aligns its — at column 16, and provider_directory is 18 characters, so that line breaks the alignment of the block.

Part 2: sync all four locales

The English page has two relevant places:

  1. The exclusion-reason area (line 67 today) — carry over whatever Part 1 settles on, not the current wording.
  2. The providerDirIgnoreDirs paragraph (lines 87-91) gained a sentence explaining that preview reports these files as provider_directory, that they never reach the per-file filter, and that an include rule cannot make them reviewable. This part is correct as written and can be translated as-is.

The corresponding reason lists in the localized pages:

locale file reason list
zh pages/src/content/docs/zh/architecture.md line 60
ja pages/src/content/docs/ja/architecture.md line 48
ko pages/src/content/docs/ko/architecture.md line 64
ru pages/src/content/docs/ru/architecture.md line 75

Each page already carries the providerDirIgnoreDirs paragraph, so it only needs the new sentence.

One thing to match rather than decide: the reason codes themselves (binary, default_path, provider_directory, ...) are literal CLI output and stay in English — only the description after the dash is translated. The ru page translates those descriptions, while zh, ja and ko currently keep this particular block in English. Follow whatever each page already does.

Scope

  • File(s): pages/src/content/docs/{en,zh,ja,ko,ru}/architecture.md

Acceptance Criteria

  • The English page no longer lists provider_directory among whyExcluded's return values
  • All five pages state that an include rule cannot override a provider-directory exclusion, and that such files never reach the per-file filter
  • Descriptions are in the same language as the surrounding block on each page
  • No source-code changes, so make check is sufficient

Context

Found while reviewing #1223 after it merged (3bce7ad).


AI/LLM disclosure: the analysis above is my own. Claude Code (Claude Opus 5) was used to polish the English wording and to file this issue via gh.

Activity

  1. added
    documentation
    good first issue
    i18n
    on Sep 14, 2026
  2. changed the title [-]docs(i18n): sync the provider_directory exclusion reason to localized architecture pages[/-] [+]docs: provider_directory is documented as a whyExcluded reason, and is missing from four locales[/+] on Sep 14, 2026
  3. Fayupable commented on Sep 14, 2026

    @Fayupable
    Contributor

    I'd like to work on this. Happy to fix the english page (remove provider_directory from the whyExcluded return-value list, verified against internal/agent/selection.go that it's never actually returned there) and sync the correction across the zh/ja/ko/ru architecture.md files as described. Could you assign this to me?

  4. added a commit that references this issue on Sep 14, 2026
    2399251
  5. added a commit that references this issue on Sep 17, 2026
    f364498
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

documentationgood first issuei18n

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions