You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add and change cloud files and Google documents in Docs & Files - #1012
The gap card 10476950575 names four SDK operations the CLI doesn't reach: adding and changing cloud files and Google documents in Docs & Files. files show already reads both kinds; nothing could create or edit them.
The groups hang off files, so they appear under its aliases too (docs, vaults, …), like files documents and files folders.
Update is a full replace in Basecamp. Both controllers build a new recordable from the permitted params alone, so an omitted title or description is erased. The update commands read the record first and send back every field no flag changes. The description goes back verbatim, as files update already does for documents. The known rich-text write-back problem with @mentions is card 10439714339.
--service is inferred from the URL's host with the same table doors uses, falling back to other. --type is inferred from a docs.google.com path (document, spreadsheets, presentation), falling back to other. An explicit flag wins. On update, a new URL changes the service or type only when its host or path names one.
Google documents publish on create unless --draft is given, matching files documents create; Basecamp's own default is a draft. On update, status is left out unless --publish is given, so Basecamp keeps the document's current status. --publish=false is refused, because a published document can't go back to a draft.
files show breadcrumbs for a cloud file or Google document now point at these update commands, not at files update, which can't change them.
Builds on
main at 29150b2, which already pins SDK v0.35.0, with main merged in through da36c00. No bump is needed.
Left out
--subscribe on cloud-files update. bc3 applies subscriptions on update only to a drafted recording (Recording::DraftSubscribers), and CloudFilesController always creates and updates a cloud file as active. The flag would be a no-op. On google-docs update it is offered and documented as affecting drafts only.
Subscriptions on files upload. The card also asks for upload notifications. CreateUpload is already reached, but files upload still sends no subscriber list. That part of the card is untouched, so the card stays open for it.
Tests
Unit tests in internal/commands/files_links_test.go cover:
inference of the service and type;
subscribers sent, [] for --no-subscribe, and none by default;
refusals before any request;
update sending back unchanged fields;
an empty --description clearing it;
draft and publish;
an explicit --type winning over the URL.
e2e validation in e2e/files.bats: create without --url, update with no fields, an unknown --type.
Smoke: e2e/smoke/smoke_file_links.bats creates and renames one of each against the QA project. The docs and vaults variants are marked out of scope in smoke_lifecycle.bats, as for the other files subgroups. check-smoke-coverage accounts for every leaf.
API-COVERAGE.md gains cloud_files and google_documents rows (232 of 232 tracked), and .surface is regenerated.
bin/ci passes locally on c742d62, which merges main through 2032be2. One earlier run failed three timing tests in internal/connector/runner (untouched here); they pass alone and on a full rerun.
Adds files cloud-files create/update and files google-docs create/update, so the CLI can now add and change cloud files and Google documents in Docs & Files; previously files show could only read them.
Updates replace the whole record in Basecamp, so the update commands read the record first and send back every field no flag changes; an explicitly empty --description clears it. An unchanged description's mentions and files are reduced to bare tags, since Basecamp returns them expanded and stores an expanded copy.
Update accepts a URL only from a trusted Basecamp host naming one record of its own type in the configured account, and refuses a comment's permalink; descriptions upload the local images they name.
--service is inferred from the URL host and --type from a docs.google.com path, with an explicit flag winning.
Google documents publish on create unless --draft is given; on update, status is untouched unless --publish.
files show breadcrumbs for these records now point at the new update commands, naming the ID create prints since files list doesn't list them; follow-up commands carry the profile and account.
--subscribe is omitted from cloud-files update because Basecamp only applies subscriptions to drafted records, and cloud files are always active; on google-docs update it affects drafts only.
Subscriptions on files upload are still unsupported, so the gap card stays open for that.
Written for commit 84af125. Summary will update on new commits.
files cloud-files create/update and files google-docs create/update reach
the SDK's CreateCloudFile, UpdateCloudFile, CreateGoogleDocument and
UpdateGoogleDocument. Basecamp replaces the whole record on update, so the
update commands read it first and send back every field no flag changes.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Update commands fail to validate URL hosts, accounts, and resource types, allowing look-alike or cross-account URLs to trigger unintended reads or updates in the configured account.
Adds create and update commands for cloud files and Google documents under files and its aliases, extending Docs & Files support beyond reading these records.
Changes:
Adds service/type inference, subscription controls, and Google document draft/publish options.
Preserves fields not explicitly changed during full-replacement updates and adds type-specific update breadcrumbs.
Adds unit, validation, and smoke tests; updates API coverage and the CLI surface snapshot.
[!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.
File
Description
internal/commands/files.go
Registers new command groups and updates breadcrumbs.
internal/commands/files_links.go
Implements cloud file and Google document creation and updates.
internal/commands/files_links_test.go
Tests inference, validation, subscriptions, and field preservation.
e2e/smoke/smoke_lifecycle.bats
Marks shared alias commands as covered by canonical commands.
e2e/smoke/smoke_file_links.bats
Adds live create/update smoke scenarios.
e2e/files.bats
Adds command-line validation tests.
API-COVERAGE.md
Documents cloud file and Google document endpoint coverage.
…ocument writes
Update takes a URL only from a trusted Basecamp host, naming one record of
its own type in the configured account, as doors does. Descriptions upload
the local images they name, as the other Docs & Files writes do. The smoke
runner runs smoke_file_links.bats, and the files catalog lists the two
new groups.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Recovery hints recommend listings that cannot expose the needed IDs, and follow-up commands omit account/profile scope, so copied commands can fail to find the intended records.
Include effective account and profile in breadcrumbs
internal/commands/files_links.go:270
The new show/update breadcrumbs omit the effective account and active profile, so copying them after using a one-off --account, --profile, or URL-supplied account can fail to find the record. Capture newFollowUpScope(app) before account resolution or URL adoption, then append scope.args(app.Config.AccountID) as doors.go does. Apply this to all four new handlers and the new update breadcrumbs in internal/commands/files.go:1555–1561.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Follow-up commands lose profile/account scope and may use the wrong credentials or account, while listing guidance incorrectly suggests that files list includes cloud files and Google documents.
With --profile, a one-off --account, or an account adopted from an update URL, these numeric-ID breadcrumbs lose the invocation's scope; copying them can use different credentials/account or fail noninteractively. Capture newFollowUpScope(app) before account resolution or linkIDArg, then append scope.args(app.Config.AccountID) to each new show/update breadcrumb, as doors does. Apply this to both create/update command pairs here and the update hints in internal/commands/files.go:1555,1561.
…p the account in follow-ups
files list doesn't list cloud files or Google documents, so the hints name
the ID create prints instead. Follow-up commands carry the profile and an
account that came from a URL or a flag, as doors does.
🤖 Converged again on c742d62. It merges main through 2032be2 (#1045: the MCP toolkit bump and tool titles; no conflicts) and refuses a comment's permalink in cloud-files update and google-docs update, answering Copilot's thread. bin/ci is green on the head. One run before that failed three timing tests in internal/connector/runner, a package this PR doesn't touch; they passed when that package ran alone, and on a second full run. CI is green on the head (cubic stopped at its line limit and reported neutral). Copilot approved and Codex found no issues on this head. No open threads. Ready for a person to merge.
* origin/main:
Open pin-comment repair PRs as the org PR bot (#1052)
Stop approving Dependabot PRs with GITHUB_TOKEN (#1048)
Send mentions and files back bare when rich text is edited (#1046)
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Human review is needed to assess the data-integrity tradeoff of resending expanded rich-text descriptions verbatim and validate live attachment/mention round trips, since stub tests cover only plain descriptions.
cloud-files update and google-docs update send back the description
they read when no flag changes it. Basecamp returns mentions and files
expanded, and stores an expanded one as content of its own, so each
update added another copy of the figure. Reduce them to bare tags with
richtext.CollapseAttachments, as rich-text input already is (#1046).
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Human review is needed to assess the impact of delayed stdin description validation, which can mask input errors behind account/API failures or trigger unnecessary network requests.
c87dba5 fixes what Copilot's review of 7686137 flagged about Send mentions and files back bare when rich text is edited #1046. When no flag changes the description, cloud-files update and google-docs update sent it back exactly as read. Basecamp returns mentions and files expanded, and stores an expanded one as content of its own, so each update added another copy of the figure. The resent description now goes through richtext.CollapseAttachments, as rich-text input does since Send mentions and files back bare when rich text is edited #1046. TestLinkUpdatesSendAnUnchangedDescriptionsMentionsBackBare covers both commands. It fails with the fix reverted and passes with it.
bin/ci is green on the head. One earlier run failed TestARequestStartsFreshWhenTheEarlierSessionIsGone/claude in internal/connector/runner, which this PR doesn't touch. It timed out at 10.6s under host load, passed alone in 1.8s, and the full gate passed on the rerun. CI is green on the head, Codex found no issues on it, and there are no open threads.
Review bodies: 1 finding answered (declined).
Declined: Copilot's review of c87dba5 says --description - is validated only after the record is read. That order is deliberate. Reading the description also uploads any local images it names (resolveLocalImages), and reading it first would upload them before we know the record exists. The only request made before validation is a GET, and nothing is written until the description is valid.
…950575
* origin/main:
Keep a person's client flag when it is false (#1055)
Filter gauge listings by chosen projects (#1049)
Say how to recover a broken connect.json, and keep reporting around it (#1053)
Support schedule entry drafts, highlights, and join links (#1019)
Let auth login reach a beta preview on a private network (#1054)
Resubscribe the feed when its socket stays connected and stops delivering (#1056)
🤖 Converged again on 84af125. It merges main through e18cb59 (#1019, #1049, #1053, #1054, #1055, #1056). The only files both sides touched are .surface and API-COVERAGE.md, and both merged without conflicts.
bin/ci is green on the head, and so is CI. Copilot approved this head and Codex found no issues on it. There are no open threads, and no review body has a finding left unanswered.
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The gap card 10476950575 names four SDK operations the CLI doesn't reach: adding and changing cloud files and Google documents in Docs & Files.
files showalready reads both kinds; nothing could create or edit them.What changed
CreateCloudFilebasecamp files cloud-files create [title] --url … [--service] [--description] [--subscribe|--no-subscribe] [--visible-to-clients]UpdateCloudFilebasecamp files cloud-files update <id|url> [--url] [--title] [--service] [--description]CreateGoogleDocumentbasecamp files google-docs create [title] --url … [--type] [--description] [--draft] [--subscribe|--no-subscribe] [--visible-to-clients]UpdateGoogleDocumentbasecamp files google-docs update <id|url> [--url] [--title] [--type] [--description] [--publish] [--subscribe|--no-subscribe]The groups hang off
files, so they appear under its aliases too (docs,vaults, …), likefiles documentsandfiles folders.files updatealready does for documents. The known rich-text write-back problem with @mentions is card 10439714339.--serviceis inferred from the URL's host with the same tabledoorsuses, falling back toother.--typeis inferred from a docs.google.com path (document, spreadsheets, presentation), falling back toother. An explicit flag wins. On update, a new URL changes the service or type only when its host or path names one.--draftis given, matchingfiles documents create; Basecamp's own default is a draft. On update, status is left out unless--publishis given, so Basecamp keeps the document's current status.--publish=falseis refused, because a published document can't go back to a draft.files showbreadcrumbs for a cloud file or Google document now point at these update commands, not atfiles update, which can't change them.Builds on
mainat 29150b2, which already pins SDK v0.35.0, with main merged in through da36c00. No bump is needed.Left out
--subscribeoncloud-files update. bc3 appliessubscriptionson update only to a drafted recording (Recording::DraftSubscribers), andCloudFilesControlleralways creates and updates a cloud file as active. The flag would be a no-op. Ongoogle-docs updateit is offered and documented as affecting drafts only.files upload. The card also asks for upload notifications.CreateUploadis already reached, butfiles uploadstill sends no subscriber list. That part of the card is untouched, so the card stays open for it.Tests
internal/commands/files_links_test.gocover:[]for--no-subscribe, and none by default;--descriptionclearing it;--typewinning over the URL.e2e/files.bats: create without--url, update with no fields, an unknown--type.e2e/smoke/smoke_file_links.batscreates and renames one of each against the QA project. Thedocsandvaultsvariants are marked out of scope insmoke_lifecycle.bats, as for the otherfilessubgroups.check-smoke-coverageaccounts for every leaf.API-COVERAGE.mdgainscloud_filesandgoogle_documentsrows (232 of 232 tracked), and.surfaceis regenerated.bin/cipasses locally on c742d62, which merges main through 2032be2. One earlier run failed three timing tests ininternal/connector/runner(untouched here); they pass alone and on a full rerun.Gap card
https://app.basecamp.com/2914079/buckets/48521764/card_tables/cards/10476950575
Summary by cubic
Adds
files cloud-files create/updateandfiles google-docs create/update, so the CLI can now add and change cloud files and Google documents in Docs & Files; previouslyfiles showcould only read them.--descriptionclears it. An unchanged description's mentions and files are reduced to bare tags, since Basecamp returns them expanded and stores an expanded copy.--serviceis inferred from the URL host and--typefrom a docs.google.com path, with an explicit flag winning.--draftis given; on update, status is untouched unless--publish.files showbreadcrumbs for these records now point at the new update commands, naming the ID create prints sincefiles listdoesn't list them; follow-up commands carry the profile and account.--subscribeis omitted fromcloud-files updatebecause Basecamp only applies subscriptions to drafted records, and cloud files are always active; ongoogle-docs updateit affects drafts only.files uploadare still unsupported, so the gap card stays open for that.Written for commit 84af125. Summary will update on new commits.