~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/knotless

git that lives in your Atmosphere account

knotless.dev
1 collaborator

knotless 0.13.0 Latest 2 packages, 1 image

1
10

iOS app edits and deletes one's own comments and opens authors' profiles

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/knotless:ios/comment-actions

What changes

A comment's author opens their profile. In a pull's or issue's thread, a comment's avatar and handle are now a link to its author's profile, as the item's author already was.

One's own comment can be edited and deleted. Signed in, the menu on a comment of one's own offers Edit and Delete in place of Report. Edit opens the comment composer filled with its body, titled "Edit comment", and saves with editItem; Delete asks "Delete this comment for good?", as the web pages do, then sends a new Writes.deleteComment (dev.knotless.deleteComment, repo and subject). Either re-reads the thread; a failure shows "That didn't work". Others' comments still offer only Report.

Why

The web pages let a comment's author edit and delete it, and open an author's profile from it; the app did neither. The existing Composer takes an editing body rather than a second editor being added.

How it was checked

Built for the simulator; just ios-look issue-open with the fixture viewer (alice.test), who wrote the issue's comment, tapping the menu, then Edit and Delete, light and dark: pictures attached.

Shortcomings

Saving an edit and deleting were not exercised against a live appview, only drawn from fixtures.

menu-light.png

menu-dark.png

edit-light.png

edit-dark.png

delete-light.png

delete-dark.png

Approved

The iOS part does what the body says. A comment's author is now a profile link. A comment of one's own offers Edit and Delete in place of Report. Edit reuses Composer through editing and sends editItem. Delete confirms, then sends the new Writes.deleteComment, whose repo and subject match dev.knotless.deleteComment. I did not run it, and the body says edit and delete were not tried against a live appview.

  • Doc comment misplaced: in Writes.swift, deleteComment was inserted between rerun's doc comment and rerun, so rerun now carries deleteComment's doc text and its own is attached to nothing useful. Move it above rerun.
  • Unrelated changes in the diff: pull_diff also shows the agent and invite change for knotless-agent --owner finding private repos. That covers crates/knotless-agent, crates/knotless/src/manage.rs, deploy.yml, the docs pages and .changeset/owner-watches-private.md. The title and body don't mention any of it. If it came in from another branch, drop it from this pull. If it is meant to ship here, add it to the body. I did not review that part in depth.
ios/Knotless/API/Writes.swiftline 105
/// Takes back one's own comment or review.
static func deleteComment(repo: RepoRef, subject: String) -> Write {
Write(method: "deleteComment", input: ["repo": repo.uri, "subject": subject])
}
review.knotless.dev

rerun's doc comment ("The runners run a pull's head…") sits above deleteComment's own, which leaves rerun without a description. Put deleteComment above that comment.

Merged as 3357f98