)]}'
{
  "log": [
    {
      "commit": "e34ffd60e0a8dfc5ba55be35d68a396a73d53750",
      "tree": "208c68febe0f077054d1709cc732192aee367413",
      "parents": [
        "783ab31ae38604be5331ec030264dcec08574aae"
      ],
      "author": {
        "name": "Philip Zeyliger",
        "email": "philip@bold.dev",
        "time": "Fri Jul 25 13:20:49 2025 -0700"
      },
      "committer": {
        "name": "Philip Zeyliger",
        "email": "philip@bold.dev",
        "time": "Fri Jul 25 13:23:37 2025 -0700"
      },
      "message": "sketch: fix diff view editing of gitignore\u0027d files and forward more http errors to logs\n\nFixes https://github.com/boldsoftware/sketch/issues/213\n\nWe had \"sketch\" git ignored, so \"git add sketch/cmd/sketch/main.go\" was\nfailing when a user was editing it in diff view. The gitignore was\nincorrectly specified. (\"git ls-files -i -c --exclude-standard\"\nreturning main.go should have tipped us off, but who knew!)\n\nAnyway, fixed that, and improved the logging.\n\nCo-Authored-By: sketch \u003chello@sketch.dev\u003e\nChange-ID: s3ed65211dd497f76k\n"
    },
    {
      "commit": "359273758d4651ec7212d49b963b56b9a7db1e34",
      "tree": "62bfa9444e6d87f6a883f1f967155d7ae6d2750a",
      "parents": [
        "c67d7bced3a3619cbf031075fa8442a696381c4a"
      ],
      "author": {
        "name": "Josh Bleecher Snyder",
        "email": "josharian@gmail.com",
        "time": "Tue Jul 22 21:38:17 2025 -0700"
      },
      "committer": {
        "name": "Josh Bleecher Snyder",
        "email": "josharian@gmail.com",
        "time": "Wed Jul 23 12:58:13 2025 -0700"
      },
      "message": "git_tools: add even more detail when commit fails\n\nFollow-up to 32577b177e34bc7b23183df22d375c9ada146613\n"
    },
    {
      "commit": "f18aafd177a90b928b1c1babbe5e763f85eab56d",
      "tree": "84fdd856884c956139be6af5cab76a0c4e1a93be",
      "parents": [
        "1ee0bc6c8f6ee7a6d0b26189815879f7455069c6"
      ],
      "author": {
        "name": "Philip Zeyliger",
        "email": "philip@bold.dev",
        "time": "Mon Jul 21 15:15:54 2025 -0700"
      },
      "committer": {
        "name": "Philip Zeyliger",
        "email": "philip@bold.dev",
        "time": "Tue Jul 22 19:29:50 2025 -0700"
      },
      "message": "Diff view: include boundary commits.\n\nIn a nearly empty repo, you want to include the boundary commits for the\ndiff view list commit list.\n"
    },
    {
      "commit": "95354b15c6469f871ecabd778c04304bcce16195",
      "tree": "0cf43e5b9d0d071df1557bf158828c4c93626c2f",
      "parents": [
        "e75d0eac125c8b72f8fa899c7d6eb64d6bdedb9e"
      ],
      "author": {
        "name": "Josh Bleecher Snyder",
        "email": "josharian@gmail.com",
        "time": "Tue Jul 22 00:03:50 2025 +0000"
      },
      "committer": {
        "name": "Josh Bleecher Snyder",
        "email": "josharian@gmail.com",
        "time": "Mon Jul 21 19:46:45 2025 -0700"
      },
      "message": "git_tools: add more detail when commit fails\n\nCo-Authored-By: sketch \u003chello@sketch.dev\u003e\nChange-ID: sae1162580ef7ab85k\n"
    },
    {
      "commit": "a8561f70c1701376e88a5b63d78e7d09a7ae3ed8",
      "tree": "6093a6ba26567089bf33a70f74399eca2c149391",
      "parents": [
        "b58bbf30db0ced33cc110dd44d6c14995977737f"
      ],
      "author": {
        "name": "Josh Bleecher Snyder",
        "email": "josharian@gmail.com",
        "time": "Tue Jul 15 23:47:59 2025 +0000"
      },
      "committer": {
        "name": "Josh Bleecher Snyder",
        "email": "josharian@gmail.com",
        "time": "Wed Jul 16 13:08:59 2025 -0700"
      },
      "message": "sketch/webui: add untracked files notification to diff view\n\nAdd warning in diff view about untracked files.\n\nCo-Authored-By: sketch \u003chello@sketch.dev\u003e\nChange-ID: s45fbbdf5b3d703e4k\n"
    },
    {
      "commit": "203724192f37239c3a2ee35fd6a982ff810aefcc",
      "tree": "0bc75e1a7334186d070112b52a0c590688b9dce5",
      "parents": [
        "95632c8a1e5953eddcb3073764b3db2c7f7bddb5"
      ],
      "author": {
        "name": "Philip Zeyliger",
        "email": "philip@bold.dev",
        "time": "Thu Jun 05 02:12:10 2025 +0000"
      },
      "committer": {
        "name": "Philip Zeyliger",
        "email": "philip@bold.dev",
        "time": "Wed Jun 04 20:35:18 2025 -0700"
      },
      "message": "git_tools: improve commit range selection when fewer than 10 commits exist\n\nReplace hardcoded fromCommit~10 check with flexible loop that tries\noffsets from 10 down to 0, selecting the first valid range.\n\nProblem Analysis:\nThe getGitLog function was failing when repositories had fewer than\n10 commits total. It attempted to check if fromCommit~10 existed and\nfell back to fromCommit..HEAD only if that check failed, causing\nissues in new repositories or shallow clones.\n\nImplementation Changes:\n- Added loop from i\u003d10 down to i\u003d0 to find the largest valid offset\n- Use git rev-parse --verify to test each fromCommit~i combination\n- Fall back to fromCommit..HEAD when no offset works (i\u003d0 case)\n- Maintain same git log command structure and output format\n\nBenefits:\n- Works correctly with repositories of any size\n- Gracefully handles edge cases like single commits\n- Maintains existing functionality for larger repositories\n- No changes to function signature or return format\n\nTesting:\nAll existing tests continue to pass, confirming backward compatibility.\n\nCo-Authored-By: sketch \u003chello@sketch.dev\u003e\nChange-ID: sc8c08e32b68c72dck\n"
    },
    {
      "commit": "bcc1c41fbb3a2b36f012d698d9dc02bda5cc9b19",
      "tree": "89a63acd37aa8a24392b2425174f644b2c22afa2",
      "parents": [
        "dee39e0926915213ccb6722a7e24b8ac7288bd87"
      ],
      "author": {
        "name": "Josh Bleecher Snyder",
        "email": "josharian@gmail.com",
        "time": "Thu May 29 00:36:49 2025 +0000"
      },
      "committer": {
        "name": "Josh Bleecher Snyder",
        "email": "josharian@gmail.com",
        "time": "Thu May 29 12:50:41 2025 -0700"
      },
      "message": "git_tools: add rename detection and proper handling of moved files\n\nEnhance GitRawDiff to properly handle file renames and moves by:\n\n1. Add -M flag to git diff commands to enable rename detection\n2. Update parseRawDiff to handle the different output format for renames:\n   - Rename format: :oldmode newmode oldhash newhash R100 old_path new_path\n   - Split rename operations into separate delete and add entries\n   - This allows Monaco diff view to display both old and new files\n\n3. Update DiffFile comment to document rename/copy status codes\n\nThe fix addresses GitHub issue #120 where Monaco diff view would error\nwhen displaying files that were both modified and renamed. By splitting\nrenames into delete/add pairs, the existing UI can handle moved files\nwithout requiring frontend changes.\n\nFixes #120\n\nCo-Authored-By: sketch \u003chello@sketch.dev\u003e\nChange-ID: s172724445cadbd68k\n"
    },
    {
      "commit": "e89b3080f934a4bc70a0cfa85ffff49ac78d6f2b",
      "tree": "f3bcf44b2907c5c18f555b31df923488bb5efdc7",
      "parents": [
        "7ad1c7a4b759f4ba110d092a0fbbed0b95fc80a9"
      ],
      "author": {
        "name": "Philip Zeyliger",
        "email": "philip@bold.dev",
        "time": "Thu May 29 03:16:06 2025 +0000"
      },
      "committer": {
        "name": "Autoformatter",
        "email": "bot@sketch.dev",
        "time": "Thu May 29 03:20:15 2025 +0000"
      },
      "message": "webui: comprehensive diff view improvements\n\nImplement multiple enhancements to the diff view interface for better\nusability and visual consistency with file change statistics and\nimproved navigation controls.\n\nBackend Changes:\n1. Enhanced git diff endpoint with --numstat support:\n   - Modified GitRawDiff to execute both --raw and --numstat commands\n   - Added Additions/Deletions fields to DiffFile struct\n   - Parse numstat output to show line change statistics (+X, -Y)\n   - Handle binary files and edge cases properly\n\nFrontend UI Improvements:\n2. File picker enhancements:\n   - Display (+X, -Y) change indicators next to file names\n   - Move file position indicator (\"X of Y\") between navigation buttons\n   - Simplified file info to show only status (Modified/Added/Deleted)\n   - Better visual grouping of navigation-related information\n\n3. Commit range picker refresh functionality:\n   - Added refresh button with subtle styling (gray background)\n   - 🔄 icon with \"Refresh commit list\" tooltip\n   - Reloads git log to get updated branch and commit information\n   - Proper disabled state during loading operations\n\n4. Editable file indicator improvements:\n   - Moved \"Editable\" indicator to Monaco editor save indicator area\n   - Shows \"Editable\" when file is editable but unchanged\n   - Consistent styling with \"Modified\", \"Saving\", \"Saved\" states\n   - Added proper CSS styling with gray background for idle state\n\n5. Expand/collapse button redesign:\n   - Custom SVG icons replacing text buttons\n   - Expand All: dotted line with arrows pointing away (outward)\n   - Collapse: dotted line with arrows pointing inward (toward line)\n   - Intuitive visual metaphor for show/hide functionality\n   - Enhanced tooltips with full action descriptions\n   - Renamed \"Hide Unchanged\" to \"Collapse Expanded Lines\"\n\nTechnical Improvements:\n6. TypeScript compatibility fixes:\n   - Updated mock data service with new DiffFile fields\n   - Fixed MSW handler type compatibility with proper type assertion\n   - Maintained full TypeScript checking without exclusions\n   - Added realistic mock data for testing change indicators\n\nInterface Consistency:\n- All buttons use consistent styling and hover effects\n- Better separation between navigation controls and file information\n- Improved logical grouping of related UI elements\n- Enhanced accessibility with descriptive tooltips\n\nThese changes significantly improve the diff view experience by providing\nclear visual indicators of file changes, intuitive navigation controls,\nand better organization of interface elements according to their function.\n\nCo-Authored-By: sketch \u003chello@sketch.dev\u003e\n\nChange-ID: s738289d132773bc3k\n"
    },
    {
      "commit": "75bd37d2a3067b6f431d56e891064b73dc2def2c",
      "tree": "69580944c24bd99c5286ae0611cf2998a3b85035",
      "parents": [
        "8c3b53a97ae2a204842c0c86ca859947ce20b1dd"
      ],
      "author": {
        "name": "Philip Zeyliger",
        "email": "philip@bold.dev",
        "time": "Thu May 22 18:49:14 2025 +0000"
      },
      "committer": {
        "name": "Philip Zeyliger",
        "email": "philip@bold.dev",
        "time": "Thu May 22 12:40:44 2025 -0700"
      },
      "message": "loop: auto-commit changes when saving in diff view\n\nWhat I\u0027ve done is create a git commit whenever the user edits things,\nand amend if possible. The existing detection logic pushes the commits\nto the host, BUT, I had to do some plumbing to make that happen. The\nagent state machine would be out of sorts if I did this (since we\u0027re\ndoing things outside of the loop), but, I didn\u0027t tell it, so... it\u0027s ok!\n\nIf the user has the agent running when editing, everyone can get\nconfused. There\u0027s no atomicity for the git operations, etc.\nI suspect in practice this will all be as fine as everything else is.\n\nI\u0027m not running the autoformatters. That\u0027s a weird editing experience.\n\nThe alternative was to do what the diff comments does, and let the agent\ndeal with the changes by sending it a message. I chose not to do that:\nfirst of all, I want the push to happen fast, since I don\u0027t like losing\nuser data. Second, the latency on an operation is distracting sometimes,\nand sometimes what I do next is just cherrypick my changes over, and I\u0027m\nnot interested in the pedantry of the agent and the code formatters and\nso forth. If they were faster, maybe.\n\nCo-Authored-By: sketch \u003chello@sketch.dev\u003e\nChange-ID: sec50af415124810bk\n"
    },
    {
      "commit": "8c4636270be67625cc27ce356f6da1a11e245069",
      "tree": "f6a4db58f1eb71033410150daa7290d4e41aca0a",
      "parents": [
        "5e3570280bf3bb0f84482ff9556739d34eb08093"
      ],
      "author": {
        "name": "Autoformatter",
        "email": "bot@sketch.dev",
        "time": "Fri May 16 21:54:17 2025 +0000"
      },
      "committer": {
        "name": "Autoformatter",
        "email": "bot@sketch.dev",
        "time": "Fri May 16 21:54:17 2025 +0000"
      },
      "message": "all: fix formatting\n"
    },
    {
      "commit": "272a90ee1a74bda5618d4866e03f4b7067947784",
      "tree": "9baf4f84ce80b1c7073a95b6959f6dd11ab3b48b",
      "parents": [
        "d3ac112a45111abf0e57c327d55e2cc66a136abb"
      ],
      "author": {
        "name": "Philip Zeyliger",
        "email": "philip@bold.dev",
        "time": "Fri May 16 14:49:51 2025 -0700"
      },
      "committer": {
        "name": "Philip Zeyliger",
        "email": "philip@bold.dev",
        "time": "Fri May 16 14:51:40 2025 -0700"
      },
      "message": "Add Monaco diff-view, the saga ...\n\nI set out to use Monaco to support the diff view. diff2html is lovely,\nbut there were a ton of usability improvements I wanted to make (line\nnumbers not making things double spaced, choosing which diff, editing\nthe right-hand side), and it seemed a dead end. Furthermore, Phabricator\nand Gerrit\u0027s experience is that diffs should be shown file by file,\nbecause you\u0027ll inevitably see a diff with a file that\u0027s too large, and\nthe GitHub PR view often breaks on big changes... so I wanted to show\nfiles diff-by-diff, with \"infinite\" context when unchanged sections are\nexpanded. So...\n\nUltimately, all of this was sketch-coded over maybe 30 Sketch sessions.\nI threw away a lot of branches. My git reflog is a superfund site.\n\nPrompting whole-hog didn\u0027t work. Or, rather, it made significant\nprogress, but something very serious wouldn\u0027t work, and I couldn\u0027t\nfigure out what, and nor could Sketch.\n\nInstead, I started by adding a new webcomponent that was just a\nplaceholder. Then, using https://rodydavis.com/posts/lit-monaco-editor,\nI nudged Sketch into adding Monaco to it. Sketch pulled out:\n\n   You\u0027re right, I should properly read the blog post before implementing the\n   solution. Let me check the referenced blog post.\n\nI worked heavily in the demo environment at first, but here I ran into\nthe issue that we have two different esbuild systems: one is vite and\none is esbuild.go, and they\u0027re configured differently enough.\n\nMonaco is unusable and confusingly so when its CSS isn\u0027t loaded. The right\nway to load it, I\u0027ve found, is via\n\n  @import url(\u0027./static/monaco/min/vs/editor/editor.main.css\u0027);\n\nI spent more time than I care to admit noticing that originally\nthis wasn\u0027t relative, and when we use a skaband setting, the\npaths need to be relative-aware.\n\nThe paths to the various workers need to be similarly correctly placed.\n\nGetting Sketch to build demo data but not put testing code into production\ncode was tricky. (I threw away a lot of efforts and factories and singletons...)\n\nWhen I set out to do the git commit selection, I wanted to do a bunch of\nbackend /git/* handlers. These were easy enough to code in sketch. I had\nto convince Sketch to put them in git_tools.go and not in the agent.\nIt doesn\u0027t really matter: these functions to parse git are pretty stateless,\nbut it\u0027s less work to have them separate. Sketch was mediocre at writing\ntests for them. Did you know that our container has an older version\nof git that doesn\u0027t have the same options to decorate ref names? Yeah, nor did\nI.\n\nHandling unstaged changes was fun. git diff --raw shows unstaged files\nas having identity 0000. Ideally we\u0027d be using jj and there\u0027d be\na synthetic commit, but instead uncommitted-possible files are read\nby content.\n\nA real big challenge was getting the Monaco view to use the right vertical and\nhorizontal space. I did this many, many times. I don\u0027t claim to understand flex\nand the virtual dom, and :host, and all the interactions. It would fix one\nthing and break another. The chat window would shrink. The terminal would\nshrink.\n\nScreenshot support was excellent. I eventually added paste support just so\nthat I could expedite my workflow, and Sketch coded that easily on the first\npass with minor feedback.\n\nI learned the hard way that Safari\u0027s support for WebComponents/shadow\ndom in its web inspector is rough. See https://fediverse.zachleat.com/@zachleat/114518629612122858\n\nI also learned the hard way that Chrome doesn\u0027t use fonts loaded in CSS\nin a shadow dom. That\u0027s why the codicon font had to be in the global\nstyle sheet.\n\nKudos to John Reese who kindly allowed me, a long time ago, to adapt a\nshell script he had at work to look over diffs into https://github.com/philz/git-vimdiff.\nThat\u0027s the inspiration for having the \"new code\" be editable when you\u0027re\nreviewing it; why shouldn\u0027t it be!?!\n\nThere are a handful of follow up tasks:\n\n* We lose state when we switch to the Chat view and back.\n* Need URL-based support for where we are.\n* Maybe need shortcut keys to move between diffs and changes.\n* Maybe need caching or look-ahead for downloading the next or previous\n  file.\n* We spend too much vertical real estate on all the diff selections;\n  could we scroll it out of the way, collapse it, tighten it, etc.\n* The workers sometimes throw errors into the console. I think they\u0027re\n  harmless and merely need to be caught and suppressed.\n* Needing to commit changes when things are saved is weird. Should we\n  commit automatically? Amend the previous commit? Have a button for\n  that? Show the git dirty state?\n* Our JS bundle is big. We could maybe delay loading the monaco bundle\n  to help.\n\nThanks for coming to my TED talk.\n"
    },
    {
      "commit": "d3ac112a45111abf0e57c327d55e2cc66a136abb",
      "tree": "7d2cab01515d7c482be1a39cc0492e9d9ac657e7",
      "parents": [
        "8bdf627180b64b0dc09018bf512f6ebf192ab674"
      ],
      "author": {
        "name": "Philip Zeyliger",
        "email": "philip@bold.dev",
        "time": "Wed May 14 02:54:18 2025 +0000"
      },
      "committer": {
        "name": "Philip Zeyliger",
        "email": "philip@bold.dev",
        "time": "Fri May 16 14:51:40 2025 -0700"
      },
      "message": "git_tools: Implement git diff and show API\n\nAdded git_tools package providing structured access to git diff and show commands. Exposed these methods via HTTP endpoints in loophttp.\n\nThis is a stepping stone to a better diff view.\n\nCo-Authored-By: sketch \u003chello@sketch.dev\u003e\nChange-ID: se75f0a1b2c3d4e5k\n"
    }
  ]
}
