Skip to content

feat(cli): add --comments, --private, and --no-comments - #97

Open
scott wants to merge 1 commit into
mainfrom
feat/96-share-comment-access
Open

feat(cli): add --comments, --private, and --no-comments#97
scott wants to merge 1 commit into
mainfrom
feat/96-share-comment-access

Conversation

@scott

@scott scott commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds --comments=anyone|team, --comment-visibility=public|team, --private, and --no-comments to gander share and gander watch.
  • Each policy JSON key is omitted unless that flag is set (flag.Visit), so a content refresh does not clobber stored ACL. --no-comments is an alias for --comments team. --private sends only doc_visibility=private unless other flags are set.
  • Invalid combos (--no-comments/--private with --comments anyone, anyone + team threads, private + public threads) fail before HTTP.
  • If the server accepts the POST but omits the echoed field, the CLI errors (gandermd does not support --comments; upgrade the server) instead of printing a URL.
  • gander list gains COMMENTS (anyone/team), THREADS (public/team), and PRIVATE (yes/blank). Watch PUTs stay {content} only.

Related Issue

Closes #96

Supersedes #93 (--no-comments / comments_enabled). Server issue #61 was closed; there is no comments_enabled column.

Pairing

Blocked on the post-dashboard gandermd being deployed to :latest (readJSON + DisallowUnknownFields 400s these fields against today's server).

Do not merge this until that stack is on :latest.

Testing

go test ./...
go vet ./...
go build ./...

All green. Coverage includes omit vs send, --no-comments--comments team, --private body, watch PUT content-only, invalid combos before HTTP, old-server echo check, and list columns.

Notes

No invite subcommand in v1. Token-only authors change policy by re-sharing with flags.

Omit each policy JSON key unless the flag is set so a content
refresh does not clobber share ACL. --no-comments aliases
--comments team. Old servers that drop the fields error
instead of printing a URL.

Closes #96
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: --comments, --private, and --no-comments

1 participant