Remove the `cookieJar` injection point from `StoreSandboxSecretScreen`
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- ios, swift
- Domain
- developer-experience, mobile
Research direction
Start at WordPress/Classes/ViewRelated/Developer/StoreSandboxSecretScreen.swift (init around L38–L46) and drop or default the cookieJar parameter to HTTPCookieStorage.shared, renaming it cookieStorage if kept. Update DebugMenuViewController and the SwiftUI previews that pass the storage. Check WeeklyRoundupDebugScreen.swift L197–L201 for the copy-paste that constructs StoreSandboxSecretScreen. Done when the screen always writes the store_sandbox cookie to shared storage and the unused CookieJar naming is gone.
Written by the indexing model from the issue text.
Description
Found while reviewing #26103.
StoreSandboxSecretScreen.init(cookieJar:) accepts any HTTPCookieStorage, but the screen only works when it is given HTTPCookieStorage.shared.
Details
- The screen writes the
store_sandboxcookie into the injected storage. - Both consumers of that cookie read
HTTPCookieStorage.shareddirectly —WebKitViewController.configureSandboxStore(_:)andSiteCreationPurchasingWebFlowController.injectSandboxStoreCookie(into:completion:). - Passing any other storage would write the secret where neither consumer looks, and the sandbox would silently not be applied.
- The only production call site is
DebugMenuViewController, which passesHTTPCookieStorage.shared. The other two callers are previews, and pass the same value.
The cookieJar name is also a leftover: as of #26103 the property is an HTTPCookieStorage, not a CookieJar.
Suggested fix
Drop the parameter and use HTTPCookieStorage.shared inside the screen. If the injection point is worth keeping for previews, default it to .shared and rename it cookieStorage.
Related
WeeklyRoundupDebugScreen_Preview instantiates StoreSandboxSecretScreen rather than WeeklyRoundupDebugScreen. That looks like a copy-paste slip, and it goes through the same initializer:
- Dominant language
- Swift
- Stars
- 3.9k
- Forks
- 1.2k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 56
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from wordpress-mobile/WordPress-iOS
-
[Type] Bug Self-hosted Webviews
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
wordpress-mobile/WordPress-iOS#26115 ·
Maintainers usually reply within 1 day
-
[Type] Tech Debt Site Creation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
wordpress-mobile/WordPress-iOS#26113 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
wordpress-mobile/WordPress-iOS#25657 · 1 comment ·
Maintainers usually reply within 1 day
-
Rename Stats Insight cards for clarityPossibly taken @amitraj2203 claimed this 56 days ago. Open[Pri] Low [Type] Enhancement Stats
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
wordpress-mobile/WordPress-iOS#23015 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
Remove Google Plus mentionsPossibly taken @raagad claimed this 170 days ago. Open[Type] Tech Debt Good First Issue Sharing
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
wordpress-mobile/WordPress-iOS#20142 · 15 comments ·
Maintainers usually reply within 1 day
All issues in wordpress-mobile/WordPress-iOS
Similar issues
-
🚀 [firebase_core] Bump Firebase iOS SDK (12.19.0 → 13.0.0)Possibly taken @SelaseKay claimed this today. OpenNeeds Attention type: enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
firebase/flutterfire#18769 · 1 comment ·
Maintainers usually reply within 1 day
-
🎉 Add NijiaOpenaddition
Difficulty 1/5 1-3 hours Newbie friendliness 68/100
jaywcjlove/awesome-mac#3269 ·
Maintainers usually reply within 1 day
-
Native HTTP policy fixture rejects its pathless response URLPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
bug fixed (pending release)
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
vorssaint/vorssaint-utils#2810 · 1 comment ·
Maintainers usually reply within 1 day