You are reading content from Scuttlebutt
@cel %m6JoXt048nPIVTMPzNupINDoSW8r7yIsng+6C6XufsY=.sha256

Dev Diary for 2017-11 git-ssb ssbc grant

2017-11-21

I started implementing inline comments (being able to publish a post in a commit/PR diff) %q5d5Du+....
Next I will add some more logic to get the cypherlink(s) to link to in the comment message, and then be able to post replies and render a thread.

@cel %uv+ed+pizSX4hPHxEO4IhpKS1V29J1VpFa+JLGw2E7Q=.sha256

2017-11-23

I completed implementing comments on lines in diffs in git-ssb-web: %5SAOXTt....

@arj requested this feature in %lsZl5ST... and @cryptix motivated it in %8Eh3er8.... This closes an 11-month old issue %4RfTsh/....

Example line-comment message: %Zh4ZUal...
Replies to a line-comment are the same as replies to a post thread: %W2CWvjy...

This one was a mistake; please ignore it: %RwIeGY9...

Screenshot, from http://localhost:7718/%25dj8flkHHw9iE2alf5Sip9xBRYuhnUudUbBehP5QYZ98%3D.sha256/files:

git-ssb-web-line-comments.png

To make a comment on the diff, click the "..." links on the left side of the diff view for the line where you want to place a comment. This should work on a pull-request diff or a commit diff. The comment thread will be anchored to the commit + file + line number (which is how git-appraise does it). Let me know if you find any bugs or have trouble with the feature.

Next I will try to implement UI for this in patchfoo.

@cel %P2/jL9bsw3sfKq0zVc1pey3AXUlHIkWjPUAbN0cqH7s=.sha256

2017-11-08

I fixed some bugs in git-ssb-web %0cOk4OT... and fixed an old bug in patchfoo's git integration %9Et+pO+.... I started extracting patchfoo's git integration into a standalone module (not yet published) and am going to try to simplify its API. thinking about @mix's suggestion in %6bzgEDr...

Also made some progress on ssb-npm %O47FRp6... (planned: %9cxT3Bn... ) which will help with enabling p2p installations of git-ssb.

@cel %rhCGsxxfPM8hZF9imWF173siubXNr6S4B3J0G8/c2FA=.sha256

2018-01-08

I published some work in progress on git-ssb in #patchfoo - not yet merged.

I factored out the git-ssb stuff from patchfoo into a separate library: %6fMyBKq...

and added support for rendering git diffs and git markdown files in patchfoo, and started implementing support for line-comments: %n+elcW7...

The way i implemented viewing directory trees and files and diffs in patchfoo makes it difficult to implement line-comments because i picked a schema for line-comments that is based on the git update message, commit id and file path, whereas patchfoo is rendering files and diffs just from their git object ids and message ids.
So I might have to implement an annoying function to look up a file path for a git object. Or otherwise change patchfoo to include file paths in links. This might be good to do anyway because it would help make links in markdown files work (links in markdown files to other files in a repo).
Anyway, here is a screenshot.
patchfoo-git-ssb-diff-line-comment.png

@Dominic %M28UPiIbpvqaSGniyPZeZzG0FaYDF6xAjFLOV3gva5k=.sha256

idea: what if line comments also had a pointer to blob hash?

@cel %SF+LmzyeO2vbLLneLzIJ6ptp07jlBUub9w9Li/idKos=.sha256

what if line comments also had a pointer to blob hash?

good idea; that would help when rendering a message. it might be hard to make git-ssb-web calculate that though. and patchfoo would still have to do the same work to calculate the commit+path from the git blob id when posting new comments.

@cel %6Lmkk1e+PW6dm7r9Cmn1JtqM5Raa03oPRCdbg5zRWPI=.sha256

found an acceptable hack: include the commit id and file path as hints in the request uri. when the site generates a link to a git diff or git blob, it will include those hints, getting them from the surrounding context. if those hints are present when rendering the page, we can offer the option to create line-comments. then the expensive and difficult function doesn't have to be implemented and diffs and git blob pages can remain the low-level way with git blob ids (vs. commit ids + path).

@cel %/5uZx1Nq2UWyt4TVo/8gDXjCsxvFnGR5KE/rZzx/ZAU=.sha256

2018-01-09

#patchfoo now fully supports line-comments: %LFugmYZ... %hYemPU0.... you can view existing ones, reply to them, and create new ones.

the library here is a module, ssb-git: %2jFBtZV... %/RmcCMZ.... this should be suitable for building git-ssb integration into other ssb client UIs.

screenshot showing a comment thread with composer for a line comment:
patchfoo-git-line-comment-thread.png

next i might try to make better support for pull-requests in patchfoo, or start on one of the other git-ssb issues.

User has chosen not to be hosted publicly
@cel %yCBIJ1QxcCst+zaE2/09VPqOO/JMo8veBK6R4u1/aYE=.sha256

2018-03-30

Summary

I was away from development and SSB entirely for some time, for personal reasons. The following are what I planned to accomplish in the beginning for this grant, and what I have done so far:

  • @cel %FwgAV9r...
    • Fix memory usage issue of git-ssb-web.
      Not done. May require deep restructuring.
    • Produce a better library for js ssb clients to use to integrate git-ssb.
      Done: %rhCGsxx...
    • Implement filtering of repo updates by author or other criteria.
      Not done.
    • Implement better recovery for "broken" repos.
      Not done; I'm not sure if this is still needed.
    • Identify and/or implement protocol/schema improvements.
      Protocol improvement of dependency branch traversal for recursive dependency resolution implemented.
  • @dominic %aJPiWJD...
    • job-queue thing for open issues and pull requests
      Not done.
  • @arj %lsZl5ST...
  • @Gordon %fwQAXBa...
    • ability to restrict who can push to your repository
      Not done
  • @noffle %JkbzHpO...
    • a way to easily reference repos in a github-like {author,org}/repo format via git-ssb and git-ssb-web
      Not done

I have no progress to report, but just wanted to provide this summary update.

User has not chosen to be hosted publicly
@cel %wYozNB8DKCq9Bi9dZUVjjiTS/+8GVtclj1Bc66lPCVc=.sha256

I now conclude this grant. I apologize for not completing all the things I set out to do for it.
If anyone would like to work on the things listed as "not done" in %yCBIJ1Q..., or other git-ssb issues, contact me if you have questions or would like assistance/support. cc @masukomi

Join Scuttlebutt now