Repository navigation
cmux-next: add your own background from a link, and manage your images - #21731
Conversation
Settings > Background gets Add from a Link (https only, judged by its bytes, 50 MB image / 500 MB video caps), a remove button on each of your images (not the one in use), what they take on disk, and Show in Finder. A picked, dropped or linked file must decode or play before it is copied in. Dropping a file on Settings no longer needs experimental appearance (the page already said to). The ops live in BackdropImagesPageProvider (CmuxNextPages); CmuxNextApp shrinks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Receipt for
|
|
all web/size checks green |
|
Bead |
|
Not verified: macOS jobs did not run: compile and app tests were skipped on CI passes on Written by |
|
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eir name in their folder Review fixes for Add from a Link: - The link's name is sanitized (no folders, colons or leading dots), and the renamed file must stay in the download's own folder (an encoded ../ climbed out). - A delegate-driven data task replaces download(from:delegate:), whose task delegate never saw progress: the declared length and the running count are checked against the cap for the declared type, so a huge body never lands. - Redirects off https are refused; timeouts are a minute idle, ten in all. - The temporary folder is removed on every failure. - Remove refuses the background in use natively, not just on the page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…re they start Re-review fixes: LinkDownload keeps its state in a Mutex and is plainly Sendable (no new unchecked conformance for the crash ratchet). A cancel that comes before the task exists marks the download, and the task is cancelled as soon as it is made, instead of invalidating the session first (making a task on an invalidated session raises). A body that starts like a picture gets the picture cap whatever type the server declared. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fleet compile found JSONValue (CmuxNextSettings) and revealInBackground (CmuxNextCompat) used without their imports. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A public initializer's default argument may only use publicly imported API. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gallery-coverage failed: BackdropLink had no entry. The Settings entry now covers it, with a variant that opens the link form. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
The batch Swift run crashed (SIGTRAP in dispatch_assert_queue): the import extension took the module's main-actor default, so usage()'s reduce closure asserted the main queue when the page called it from a detached task. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The batch Swift run failed aLinkNameCannotClimbOutOfTheDownloadFolder: deletingPathExtension keeps "...png" whole on macOS 26, so the stem was "png". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
PageFactory: keep the Settings > Mobile route (cnx) and the backdrop images route (#21731). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Own-backgrounds conflicts (BackdropImagesPageProvider, its tests, HostCards, ops, mockProvider, styles): base carries #21731, a subset of this branch; kept the branch's collage, adjust and workspace-shown additions. - BackdropSelection: base's DesktopPicture(...).resolvedURL(dark:) for .desktop, plus .collage with .art and .file. - store.ts: dropped the branch's second copy of addBackdropLink, removeBackdropImage, revealBackdropImage and backdropUsage; base's trackAppearance versions stay. - hostCards.test.tsx: kept the branch's adjust and collage tests and base's two wallpaper tile tests. - generated/strings.json removed (now build output, #21970); settings schema and sources.sha256 taken from base for autofix to regenerate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Phase 3 of the backgrounds plan (briefs/next-backgrounds-plan.md): an easier way to add your own background.
What changes
Settings > Background:
experimentalAppearanceon, even though the picker already said "Or drop an image anywhere on this page."Checks before a file is copied in. This covers picked, dropped and linked files, through
BackdropUserImages.adoptChecked:Before this, a broken file was copied in, listed, and then showed nothing.
Links:
BackdropUserImages.downloadtakes https only.Where the code lives.
BackdropImagesPageProvider(CmuxNextPages) serves the new ops on the longest prefix,cmux.settings.backdrop.image.:link,remove,revealandusage.useBackdropImage, so the check and the settings write are shared with the picker.SettingsBackdropImagesmoved to CmuxNextPages with it.Strings
10 new
settingsWindow.backdropPicker.*keys, all 21 locales, inCmuxNextSettingsWindow/Localizable.xcstrings.generated/strings.jsonis regenerated withgen-strings.mjs.Tests
CmuxNextDesignTests/BackdropImportTests:.pngis refused and never listed.png, HTML behind.pngis refused, and a 404 failsCmuxNextPagesTests/BackdropImagesPageProviderTests: the ops, refusal codes, own-images-only remove and reveal, and folder reveal.webviews/.../hostCards.test.tsx: the link form's refusals, adding sets and lists the image, the in-use image can't be removed and another can, and Show in Finder.Verification
bun test src/pages/settings: 128 pass.vp lintandvp fmton the changed files: clean.tsc: no errors in settings. The only 2 errors are files outside my sparse checkout.lint-ios-package-conventions.sh: clean.check-text-focus-rings.py: only the known base red (DaemonRecoveryControls.swift:98).Not in this PR
SettingsBackdropThumbnails, and the App can't grow, so that waits for a slot.art/manifest.jsonbelong to phase 5, since they change the schema's accepted samples.WINDOW
None. No settings schema, catalog or
Package.swiftchange. The ops are page ops, not settings keys.Changelog
Added: Add a background from a web link, and remove your own background images or show them in Finder.
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Adds Settings > Background the ability to add your own background from an https link, and management for your own images: remove (not the one in use), size on disk, and Show in Finder. Picked, dropped, and linked files are checked to decode or play before they are copied in, and dropping no longer requires the experimental appearance flag.
link,remove,reveal,usage) are served by a newBackdropImagesPageProviderinCmuxNextPages, shrinkingCmuxNextAppand importing every type it uses so the fleet compile passes. Removing the background in use is refused natively, and both folder size and Finder reveal run off the main thread.Written for commit 7d675dd. Summary will update on new commits.