Repository navigation
Conversation
PLAN_QUOTAS maps subscription_type to the space a plan ships with, but that is only where an account starts. Referral bonuses on Basic and storage add-ons on the paid tiers raise the real quota permanently while subscription_type still reads "Basic", so a long-standing Basic account renders as nearly full when it is nearly empty. The true figure lives behind the Dropbox API, which needs an OAuth token the widget has no way to ask for, so add a quotaOverrideMB setting that lets affected accounts state it. Zero keeps the existing plan lookup. Megabytes, because a quota in bytes overflows a QML int. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XAr19kW1bU8LyxkL1iz6F
There was a problem hiding this comment.
Pull request overview
Adds a configurable Dropbox storage quota override for accounts with bonuses or add-ons.
Changes:
- Adds the
quotaOverrideMBwidget setting. - Applies valid overrides while preserving plan defaults.
- Tests conversion and invalid-value fallback behavior.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
shell/plugins/panels/dropbox/manifest.json |
Defines the quota setting. |
shell/plugins/panels/dropbox/Service.qml |
Passes the configured quota to the helper. |
shell/plugins/panels/dropbox/status.py |
Validates and applies quota overrides. |
test/shell.d/dropbox-test.sh |
Covers conversion and fallback cases. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| local actual | ||
|
|
||
| actual=$(read_override "$raw") | ||
| [[ $actual == "$expected" ]] || fail "$description" "expected $expected, got $actual" |
|
Automated duplication check: this pull request looks similar to #11436, which covers the same Dropbox quota override. I keep that one open and close this one to consolidate review. If you feel this is the wrong decision, please open the PR again with a note on the difference. |
Fixes #7597.
PLAN_QUOTASin the Dropbox widget'sstatus.pymapssubscription_typeto the space a plan ships with, but that is only where an account starts. Referral bonuses on Basic (500 MB each, up to 16 GB, permanent) and storage add-ons on the paid tiers raise the real quota whilesubscription_typestill reads"Basic". My own account is 1.53 GB of 21.38 GB and the widget rendered it as1.64 GB of 2 GB— ~82% full instead of ~7%.The authoritative number lives behind the Dropbox API (
/2/users/get_space_usage), which needs an OAuth token the widget has no way to ask for, and neitherdropbox-clinor~/.dropbox/info.jsonexposes it. So rather than guess better, this lets the affected account state the figure:manifest.jsongains aquotaOverrideMBinteger setting, defaulting to0.Service.qmlreads it and passes it to the helper.status.pygainsquota_override_bytes(); the override wins when usable, and anything else — zero, negative, blank, non-numeric — falls back toPLAN_QUOTASuntouched.Megabytes rather than bytes because a real quota in bytes overflows a QML
int.Default behavior is unchanged: with the setting absent or
0, the plan lookup runs exactly as before.Before / after
Same account, before and after setting
quotaOverrideMBto21380:1.64 GB of 2 GB1.64 GB of 21.4 GB(Screenshots attached below.)
Tests
Extended
test/shell.d/dropbox-test.shwith coverage for the override reader — megabyte conversion plus each way a setting can be unusable../test/shellpasses; the three failures in./test/allon my machine are allomarchy-pkgs checkout not foundand unrelated to this change.Verified in the running UI on Omarchy 4.0.0-1 via a cloned copy of the plugin.
Notes
Two things I deliberately left out, happy to fold in either if you'd rather:
manual/24-commercial-apps-services.mdcovers Dropbox setup but no widget settings, so I left it alone rather than start that section here.usedBytesaccuracy.scan_dropbox()walks the sync folder rather than reading Dropbox, so it understates usage under selective sync (and slightly overstates here by counting.dropbox.cache). Same root cause — no API access — but a separate change.