Comparing basecamp:main...nnemirovsky:main · basecamp/basecamp-cli · GitHub
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: basecamp/basecamp-cli
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: nnemirovsky/basecamp-cli
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 14 commits
  • 16 files changed
  • 1 contributor

Commits on Apr 24, 2026

  1. fix(richtext): prefer Href over preview URL in DisplayURL

    ParsedAttachment.DisplayURL() returned the preview URL
    (preview.3.basecamp.com/.../previews/full) before the download href
    (storage.3.basecamp.com/.../download/<filename>). For non-image
    attachments (csv, xlsx, zip, pdf, ...) the preview endpoint returns a
    generic SVG file-type icon, so every caller that went through
    DisplayURL() downloaded a ~3.8KB placeholder instead of the real file.
    Image attachments happened to work because their preview URL returns
    the real image, which is why this bug went unnoticed.
    
    Every internal caller of DisplayURL() is a download path (cards show
    --download-attachments, attachments list, attachments download,
    downloadableAttachments), so preferring Href is correct across the
    board. URL is kept as a fallback for the rare case where an attachment
    has no downloadable blob.
    
    The existing richtext unit test pinned the wrong behavior ("URL wins")
    and the commands TestAttachmentMeta fixture did the same; both are
    updated to assert the new contract with a non-image-looking URL pair.
    nnemirovsky committed Apr 24, 2026
    Configuration menu
    Copy the full SHA
    3560d7d View commit details
    Browse the repository at this point in the history
  2. fix(attachments): suggest --type on 404 from generic recording lookup

    The generic /recordings/<id>.json endpoint is not addressable at the
    account scope for every recording type. Kanban::Card is the concrete
    case: its recording is only reachable via the bucket-scoped
    /buckets/<bucket>/card_tables/cards/<id>.json endpoint, so the generic
    lookup returns 404. Before this commit, fetchItemContent routed that
    404 through convertSDKError and surfaced a bare "Resource not found"
    error, leaving the user with no hint that --type was required.
    
    The existing 204 branch of the same function already emits a friendly
    "Specify a type" usage hint listing every accepted type. Do the same
    on 404 from the generic path so cards (and any other bucket-scoped
    type) produce the actionable error. Narrow scope: only fires when
    isGenericType(recordType) and the SDK error is CodeNotFound, so any
    path that already worked is untouched.
    
    Pulls the hint string into a package const (genericLookupTypeHint) so
    the 204 and 404 branches stay in sync.
    nnemirovsky committed Apr 24, 2026
    Configuration menu
    Copy the full SHA
    a284543 View commit details
    Browse the repository at this point in the history
  3. fix(richtext): emit <div> paragraphs and <div><br></div> breaks for Trix

    Trix (the editor behind Basecamp's rich-text fields) stores paragraphs as
    <div>...</div> and blank-line separators as <div><br></div>. goldmark's
    default output — <p>...</p>\n<br>\n<p>...</p> — renders with the block
    margins of <p> *plus* the line break of the intervening <br>, producing
    double spacing in Basecamp between what the user typed as a single blank
    line between two paragraphs.
    
    MarkdownToHTML changes:
    - trixRenderer registers renderParagraph, emitting <div>...</div> for
      top-level paragraphs. trixTransformer already converts paragraphs
      inside lists and blockquotes into TextBlocks, so this only fires where
      it should.
    - trixRenderer.renderTrixBreak emits <div><br></div>\n instead of <br>\n.
    - trixRenderer.renderHTMLBlock wraps raw HTML blocks in <div> instead of
      <p> for consistency.
    - The MarkdownToHTML error-path fallback ("<p>" + escaped + "</p>")
      mirrors the new shape.
    
    HTMLToMarkdown changes (for round-trip fidelity with Trix-native HTML
    coming from the API):
    - Add reDivBr and reDiv patterns running before the existing <p>/<br>
      pipeline: <div><br></div> becomes a blank line, <div>...</div> becomes
      a paragraph.
    - blockquoteInnerToMarkdown gains <div>/<div><br></div> handling so
      multi-paragraph blockquotes round-trip cleanly; without it, the inner
      <div><br></div> cascades through the outer blockquote line-splitter
      and produces extra ">" lines.
    
    Test updates:
    - MarkdownToHTML expected strings flip <p>→<div>, </p>→</div>, and the
      block-level break \n<br>\n → \n<div><br></div>\n. Applied via a
      targeted sweep, verified one by one against the rendered output.
    - ResolveMentions test inputs flip <p>→<div> to stay representative of
      what MarkdownToHTML now produces and what Trix emits natively.
    - TestEditLoopRoundTrip/multi-paragraph_blockquote: now passes cleanly
      because of the new blockquote <div> handling.
    - TestCheckinsAnswerCreateDefaultsDateToToday in internal/commands
      asserted the wrapper shape; updated to <div>.
    
    Inline <br> inside a paragraph (consecutive lines with single \n between
    them) is unchanged: trixTransformer still converts soft-break → hard-break
    inside <div>, matching Trix's own line-break representation.
    nnemirovsky committed Apr 24, 2026
    Configuration menu
    Copy the full SHA
    d086a88 View commit details
    Browse the repository at this point in the history
  4. Local integration: merge fix/attachment-download onto trix-updated main

    Combines both PRs' branches for local use via `go install`:
    - PR #421 (trix): <div>/<div><br></div> paragraph shape, soft→hard break
      in top-level paragraphs, HTMLToMarkdown round-trip for <div>.
    - PR #447 (attachments): prefer download Href over preview URL in
      ParsedAttachment.DisplayURL; suggest --type on 404 from generic
      /recordings lookup.
    
    Upstream each PR remains separately reviewable at basecamp/basecamp-cli.
    nnemirovsky committed Apr 24, 2026
    Configuration menu
    Copy the full SHA
    269c0f7 View commit details
    Browse the repository at this point in the history

Commits on May 4, 2026

  1. feat(chat): add chat update command for editing campfire messages

    Adds 'basecamp chat update <id|url> [content]' for editing existing
    campfire lines in place via PUT /chats/{c}/lines/{l}. Mirrors 'chat post'
    shape: positional content or --content flag, --content-type for HTML,
    @mention resolution with auto-promotion to text/html.
    
    Backed by basecamp-sdk CampfiresService.UpdateLine. While the SDK
    addition is in flight, go.mod has a temporary replace pinning to a
    fork branch carrying just that operation; the replace is dropped
    once an SDK release with UpdateLine ships.
    
    Wires up surface snapshot, smoke + e2e coverage, and the basecamp
    skill documentation.
    nnemirovsky committed May 4, 2026
    Configuration menu
    Copy the full SHA
    91d7567 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    17b56fc View commit details
    Browse the repository at this point in the history
  3. chore: bump SDK fork pin to pick up content_type doc fix

    Addresses Copilot review on basecamp/basecamp-sdk#295: align UpdateLineOptions
    ContentType doc with the rest of the campfires service (API defaults to plain
    text).
    nnemirovsky committed May 4, 2026
    Configuration menu
    Copy the full SHA
    14ada38 View commit details
    Browse the repository at this point in the history
  4. feat(chat): add chat update command for editing campfire messages

    Adds 'basecamp chat update <id|url> [content]' for editing existing
    campfire lines in place via PUT /chats/{c}/lines/{l}. Mirrors 'chat post'
    shape: positional content or --content flag, --content-type for HTML,
    @mention resolution with auto-promotion to text/html.
    
    Backed by basecamp-sdk CampfiresService.UpdateLine. While the SDK
    addition is in flight, go.mod has a temporary replace pinning to a
    fork branch carrying just that operation; the replace is dropped
    once an SDK release with UpdateLine ships.
    
    Wires up surface snapshot, smoke + e2e coverage, and the basecamp
    skill documentation.
    nnemirovsky committed May 4, 2026
    Configuration menu
    Copy the full SHA
    6aaf95b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8cbb2ed View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    61adf4e View commit details
    Browse the repository at this point in the history
  7. feat(chat): add chat update command for editing campfire messages

    Adds 'basecamp chat update <id|url> [content]' for editing existing
    campfire lines in place via PUT /chats/{c}/lines/{l}. Mirrors 'chat post'
    shape: positional content or --content flag, --content-type for HTML,
    @mention resolution with auto-promotion to text/html.
    
    Backed by basecamp-sdk CampfiresService.UpdateLine. While the SDK
    addition is in flight, go.mod has a temporary replace pinning to a
    fork branch carrying just that operation; the replace is dropped
    once an SDK release with UpdateLine ships.
    
    Wires up surface snapshot, smoke + e2e coverage, and the basecamp
    skill documentation.
    nnemirovsky committed May 4, 2026
    Configuration menu
    Copy the full SHA
    96cf589 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    7b3fd86 View commit details
    Browse the repository at this point in the history
  9. feat(chat): add chat update command for editing campfire messages

    Adds 'basecamp chat update <id|url> [content]' for editing existing
    campfire lines in place via PUT /chats/{c}/lines/{l}. Mirrors 'chat post'
    shape: positional content or --content flag, --content-type for HTML,
    @mention resolution with auto-promotion to text/html.
    
    Backed by basecamp-sdk CampfiresService.UpdateLine. While the SDK
    addition is in flight, go.mod has a temporary replace pinning to a
    fork branch carrying just that operation; the replace is dropped
    once an SDK release with UpdateLine ships.
    
    Wires up surface snapshot, smoke + e2e coverage, and the basecamp
    skill documentation.
    nnemirovsky committed May 4, 2026
    Configuration menu
    Copy the full SHA
    a0dd509 View commit details
    Browse the repository at this point in the history
  10. Merge branch 'feat/chat-update'

    # Conflicts:
    #	internal/commands/chat.go
    nnemirovsky committed May 4, 2026
    Configuration menu
    Copy the full SHA
    35638c5 View commit details
    Browse the repository at this point in the history
Loading