Preserve duplicate WebView asset paths when deduplicating uploads
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- typescript
- 領域
- cli
調査の方向性
Start at #mapAssets() and the WebView upload path, then compare its handling with the regular-media upload path's final hash-and-size lookup. Add regression coverage for two differently named WebView files with identical contents and verify that both paths appear in webViewAssetMap with the same uploaded URL while different hashes remain distinct.
索引モデルが issue の本文から書いたものです。
説明
Description
Duplicate WebView assets can be omitted from the returned webViewAssetMap.
When multiple WebView files have identical contents, #mapAssets() correctly deduplicates them so that only one file is uploaded. However, the duplicate file paths are not subsequently mapped to the uploaded asset URL.
As a result, only the first unique path may be present in webViewAssetMap, while other files with the same hash and size are missing.
Current behavior
Given two WebView assets with identical contents:
client/header-logo.svg
client/footer-logo.svg
the CLI may:
- classify one file as a new asset;
- classify the other as a duplicate;
- upload only the first file;
- add only the first file path to
webViewAssetMap.
The duplicate path is not associated with the uploaded URL.
The regular-media upload path already performs a final hash-and-size lookup that maps duplicate paths to the same uploaded asset ID. The WebView upload path does not appear to have equivalent behavior.
Expected behavior
Duplicate WebView assets should continue to be uploaded only once, but every original file path should be included in webViewAssetMap.
For example:
{
"header-logo.svg": "https://example.com/uploaded-asset",
"footer-logo.svg": "https://example.com/uploaded-asset"
}
Both paths should resolve to the same uploaded URL.
Proposed implementation
Track uploaded WebView asset URLs by a stable signature such as:
`${asset.hash}:${asset.size}`
After each unique asset is uploaded:
- associate its signature with the final uploaded URL;
- add the unique asset path to
assetMap; - add every duplicate path with the same signature to
assetMap.
The duplicate lookup in #mapAssets() currently scans the growing newAssets array with .find(). Replacing that lookup with a signature Set or Map would also reduce duplicate classification from O(n²) to O(n).
Acceptance criteria
- Duplicate WebView files are uploaded only once.
- Every duplicate file path is included in
webViewAssetMap. - Duplicate paths resolve to the same uploaded URL.
- Files with the same size but different hashes are not deduplicated.
- Existing behavior for unique and already-existing WebView assets remains unchanged.
- Regression tests cover at least two WebView files with different paths and identical contents.
- 主要言語
- TypeScript
- スター
- 210
- フォーク
- 88
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
reddit/devvit のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 42/100
似ている issue
-
Browser Waiting for: Product Owner
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
getsentry/sentry-javascript#24577 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
agilepathway/label-checker#640 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
copse-dev/agent-pane#2953 ·
-
agentic-workflows
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
githubnext/rig#534 ·
-
automation missing-model model-sync provider:pioneer
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
anomalyco/models.dev#7701 ·