TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Crocodile - Better code review for GitHub

144 点作者 jameslao将近 3 年前
Hi HN!<p>I&#x27;ve been working on a code review app for GitHub called Crocodile for about a year. I used to work at Microsoft where we used a tool called CodeFlow for reviewing code and I missed it after I left. I know many other ex-Microsoft engineers feel the same. Here are some of the distinguishing features of Crocodile that are inspired by CodeFlow:<p>* Comments float above the code instead of being inline. Long discussions that are displayed inline make it really hard to review the code.<p>* Comment on any text selection in the file, even a single character.<p>* Comments don&#x27;t get lost when code changes. I hate it when comments become &quot;outdated&quot; because I rebase or the line is edited.<p>I also implemented lots of features that I wish CodeFlow had which you can read more about on the blog. [1]<p>For those curious about the tech stack: it&#x27;s mostly written in Go with Alpine.js, HTMX, and Tailwind CSS for the frontend. For storage I use PostgreSQL, S3 compatible object storage, and Redis for caching. I use Pulumi for infrastructure provisioning and Kubernetes deployments. Everything is hosted on DigitalOcean.<p>Feedback is welcome!<p>[1] <a href="https:&#x2F;&#x2F;www.crocodile.dev&#x2F;blog&#x2F;why-crocodile" rel="nofollow">https:&#x2F;&#x2F;www.crocodile.dev&#x2F;blog&#x2F;why-crocodile</a>

21 条评论

burlesona将近 3 年前
This looks great! Food for thought on pricing: Because you offer free for open source, there’s minimal need for a free trial for private repos. I would consider requiring a credit card and making it a 14 day trial. My experience selling SaaS in the past is this will net you fewer but much more serious evals, so whenever someone signs up you know they are legit and worth your time to contact and support. That leads to higher conversion, better retention, etc.<p>Best of luck!
评论 #31844949 未加载
bstpierre将近 3 年前
Not a knock against crocodile, which looks like a nice set of improvements over gh, but something I’d like to see done better in any code review system is significantly better code navigation.<p>For any PR that is nontrivial I will pull it locally so that I can more easily navigate to functions&#x2F;data types that are used by or changed in the PR. It would be nice if the review ui provided a way to click through to the definition of a symbol that appears in the code. (I think gh does this when browsing code for some languages.)<p>A related helpful feature would be the ability to see “what calls this”. Currently I have to do this kind of review with ‘git grep’, after pulling locally.<p>I’d also love to be able to toggle into ‘git blame’ for a given bit of code, in order to better understand why the code is in its current state
评论 #31848994 未加载
评论 #31847555 未加载
heeton将近 3 年前
I like the site + product idea, but the demo fails to show me anything interesting except a floating comment. So I can&#x27;t yet see the value of the tool.<p>The files you&#x27;ve chosen to use don&#x27;t appear to show any difference between iteration 1 and 2, so one of your major features doesn&#x27;t do anything. Is that a bug, or accidental? (I&#x27;m using Firefox 101 on MacOS 11.4).<p>My personal dumb suggestion: give a few demos, showing off the very worst points of code review hell, and how crocodile fixes each one. Make it a game. E.g.<p>&quot;You&#x27;re halfway through a large code review, and Sally has just added 2 new commits, ugh. Challenge: find the button to see the new additions, then decide if you want to include them in your current review, or review this iteration first and the new additions separately.&quot;<p>&quot;Simon has just added a merge commit that fucks everything up, all the files look weird. Challenge: there&#x27;s a way you can trivially see that the PR before this extra commit was looking great.&quot;<p>&quot;You can spot a new method that was introduced, and you&#x27;d like to see the places where it&#x27;s being called, but that&#x27;s a lot of scrolling back and forth. Challenge: find how to show code hints on a selected piece of text&quot;
imron将近 3 年前
&gt; * Comments float above the code<p>&gt; * Comment on any text selection in the file<p>&gt; * Comments don&#x27;t get lost when code changes<p>This addresses my main pet peeves with GitHub&#x2F;Bitbucket reviews!<p>2 questions:<p>With regards to comments not getting lost, how well does this work across rebases and force pushes?<p>Are you considering supporting other products like Bitbucket and Gitlab?
评论 #31845356 未加载
wingspan将近 3 年前
Thanks for calling out that this was inspired by CodeFlow, I kept thinking that as I was reading. Still one of my favorite code review tools, used ~2012.<p>One of my favorite features was a panel with every comment on the PR, sorted and organized by status. Because all files in the PR were preloaded clicking a comment instantly took you to the specific code and version. So good!
评论 #31845537 未加载
bilalq将近 3 年前
My biggest issue with Github code reviews is how broken the &quot;Changes requested&quot; state is. If I request changes, there&#x27;s no easy way to see that changes have been addressed and are clear for me to look at again.<p>I end up using open unresolved comments as the basis for changes requested now. It&#x27;s hard to filter for those though.
评论 #31845644 未加载
评论 #31845153 未加载
lallysingh将近 3 年前
It&#x27;s worth trying. There&#x27;s one quibble:<p><pre><code> How does Crocodile access my source code? Crocodile stores the source code files that are part of reviews to provide a fast user experience. Every file is encrypted with per file data encryption keys. The data encryption keys are then encrypted with a master encryption key. All cryptographic operations are performed using Google Tink, which is a cryptographic library created by cryptographers at Google that is designed to be misuse resistant. Files are encrypted using Stream AEAD using AES128_GCM_HKDF_4KB key type as recommended by Google. The data encryption keys above are encrypted using AEAD with a master AES128 key. </code></pre> So, um, what&#x27;s the story with the master encryption key? Are the master keys in their own file? E.g., if Crocodile gets hacked, can the hackers pull up everyone&#x27;s reviews (and sources)? Or does all this encryption keep it encrypted at rest and require something from the user (e.g., their password) to derive the master key?
评论 #31852347 未加载
mtlynch将近 3 年前
This is cool! I&#x27;m happy to see more options in this space.<p>The best code review tool I&#x27;ve ever used was a tool at Google called Critique.[0] They&#x27;ve open-sourced it as Gerrit[1], but there are sadly no hosted versions available for under $15k&#x2F;yr, and it&#x27;s complicated to self-host.<p>I&#x27;ve been using Reviewable, and my experience has been good not great. Github&#x27;s native code review has caught up a bit, but Github&#x27;s review tool falls apart if your review lasts more than one round.<p>Here are my gripes with Reviewable:<p>Steep learning curve - Every new developer who joins the team spends their first few reviews being confused and frustrated by Reviewable.<p>Performance - Reviewable has awful performance. It takes about 10 seconds to load a code review. It seems like it&#x27;s doing some odd websockets stuff where sometimes my &quot;connection&quot; to Reviewable will drop and I can&#x27;t add comments. I&#x27;ve never experienced this with any other web app. It&#x27;s gotten better over the last few years, but it&#x27;s still annoyingly frequent.<p>Complicated configuration - I just want the reviewer to be able to hit an &quot;LGTM&quot; button to mark their approval. Reviewable&#x27;s decision about when a PR is approved is based on this complicated function combining whether the reviewer typed the text &quot;:lgtm&quot;, how many people looked at the review, whether they also hit the approve button. Each repo has its own configuration, and I can&#x27;t make org-level changes without changing every repo one at a time.<p>Excessive permissions - This might be a Github thing, but you can&#x27;t grant Reviewable permissions to a particular private repo - you have to grant it permissions to <i>all</i> of your private repos. Several developers who join my team need to create a dedicated Github account to avoid exposing their other private repos to Reviewable.<p>Thread state is unclear - The options are &quot;discussing&quot;, &quot;satisfied,&quot; &quot;blocking,&quot; or &quot;working,&quot; and it&#x27;s not obvious who&#x27;s supposed to move the thread to what state at what point.<p>No development - I&#x27;ve been a paying customer of Reviewable for about 7 years, and I can remember only 1-2 minor features that have been added during that time. They haven&#x27;t updated their blog[2] in 6 years, and they&#x27;ve never communicated with me as a paying customer to tell me anything they&#x27;re doing.<p>I checked out Crocodile, and it looks like it has potential. I&#x27;m not sure I&#x27;d pitch it to my team to switch yet. Here are some of my thoughts:<p>* When do the reviewer&#x27;s comments become visible to the author? One of the must-have features for me is that both author and reviwer(s) can prepare a set of notes, but they&#x27;re not visible to anyone else until they hit &quot;publish&quot; to share them with the team. Sometimes I make comments in one spot, and then as I read more of the code, I revise a previous comment. If all my comments publish immediately, I can&#x27;t revise comments like that. Github, Reviewable, and Gerrit all support a flow of preparing comments and then committing them in a separate step.<p>* Crocodile touts the floating thread thing, and I&#x27;ve never used a tool that has it, but it doesn&#x27;t seem better to me. Inline comments do break the flow, but floating comments actually cover up the code and prevent me from reading it. I see I can close threads, but I can&#x27;t figure out how to get them back.<p>* Being able to comment on character-level granularity is cool!<p>* I think your thread state is better than Reviewable&#x27;s, but I&#x27;d prefer an even simpler model where threads are either &quot;open&quot; or &quot;resolved.&quot; When an author responds to a comment, the default action is to resolve it, but the author can override the default and leave it &quot;open&quot; if their comment is asking for clarification rather than declaring a fix. The reviewer can reopen a thread if they feel that the author has misunderstood the note. 95% of the time in my reviews, the reviewer makes a note and the author resolves it, so having a whole extra confirmation phase for that last 5% feels unnecessary when the reviewer can just reopen it instead.<p>* Ditto for review state. The only two states I&#x27;ve ever needed for a code review are &quot;pending approval&quot; and &quot;approved.&quot; I&#x27;ve never wanted to mark a PR as &quot;rejected&quot; unless it&#x27;s just a spam submission from a stranger on an open-source repo, and even then, I&#x27;d close it from Github rather than my code review tool. The worst I&#x27;ll do to a teammate is withhold approval until they address my notes, but I&#x27;d never mark it as &quot;rejected.&quot; I don&#x27;t need an explicit state for &quot;pending review&quot; or &quot;waiting for author&quot; because if the author is the last commenter, it&#x27;s implicitly pending review.<p>* I like that there&#x27;s a view of all the comments at once. I like to review all my comments before pushing them to the author.<p>* I&#x27;d like a way to mark a comment as &quot;no action required&quot; when I just want to say something nice[2] about the code that doesn&#x27;t require action from the author.<p>* I couldn&#x27;t understand the &quot;iterations&quot; UI control. It&#x27;s not obvious to me what the different circles represent.[4] Once I compared two diffs, I couldn&#x27;t figure out how to compare to the the full PR to the base branch (i.e., all commits aggregated). I think it&#x27;s replicating a control that Reviewable actually does pretty well, so I recommend giving it a look for inspiration.<p>* It looks like I&#x27;m only allowed to make code-level comments, but I&#x27;d like to make review-level comments as well for high-level notes about the review as a whole.<p>Hope that&#x27;s useful. I&#x27;m very interested in code reviews, so if you want to do user interviews, feel free to reach out. You can find my contact info through my HN profile.<p>[0] <a href="https:&#x2F;&#x2F;abseil.io&#x2F;resources&#x2F;swe-book&#x2F;html&#x2F;ch19.html" rel="nofollow">https:&#x2F;&#x2F;abseil.io&#x2F;resources&#x2F;swe-book&#x2F;html&#x2F;ch19.html</a><p>[1] <a href="https:&#x2F;&#x2F;www.gerritcodereview.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.gerritcodereview.com&#x2F;</a><p>[2] <a href="http:&#x2F;&#x2F;blog.reviewable.io&#x2F;" rel="nofollow">http:&#x2F;&#x2F;blog.reviewable.io&#x2F;</a><p>[3] <a href="https:&#x2F;&#x2F;mtlynch.io&#x2F;human-code-reviews-2&#x2F;#offer-sincere-praise" rel="nofollow">https:&#x2F;&#x2F;mtlynch.io&#x2F;human-code-reviews-2&#x2F;#offer-sincere-prais...</a><p>[4] <a href="https:&#x2F;&#x2F;i.imgur.com&#x2F;3ZhDAR1.png" rel="nofollow">https:&#x2F;&#x2F;i.imgur.com&#x2F;3ZhDAR1.png</a>
评论 #31846132 未加载
评论 #31855783 未加载
评论 #31849012 未加载
评论 #31846084 未加载
bluehatbrit将近 3 年前
This looks super interesting, it looks like it&#x27;d solve a few of my gripes with GitHub reviews. Congratulations on the launch!<p>One thing I&#x27;ve always wondered is why all these review tools use centralised databases. Git itself is a distributed model and reviews tend to boil down to code comments on set of lines or characters. I&#x27;m always surprised no one has created a review tool that ships around reviews like patch files. Even if there was a server as an option, like github, I could then work offline and build little tools to help make my review process more efficient.<p>I suppose it&#x27;s not quite as easy to monitise as it&#x27;s decentralised, but I&#x27;d love to see one crop up some day. Then my review process can match up with my coding process.<p>Either way this looks like a big improvement in some areas over the GitHub tools so I&#x27;ll definitely be checking it out.
评论 #31847055 未加载
catchmeifyoucan将近 3 年前
Congrats on the launch! Here&#x27;s a demo link in case folks might have missed it:<p><a href="https:&#x2F;&#x2F;app.crocodile.dev&#x2F;reviews&#x2F;rwsfSKbgZoSt?change=README.md&amp;iter=2" rel="nofollow">https:&#x2F;&#x2F;app.crocodile.dev&#x2F;reviews&#x2F;rwsfSKbgZoSt?change=README...</a>
difflens将近 3 年前
Congratulations on the launch. I find reviewing code on GitHub to be a pain too, so we came up with DiffLens (<a href="https:&#x2F;&#x2F;github.com&#x2F;marketplace&#x2F;difflens" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;marketplace&#x2F;difflens</a>). DiffLens is only concerned with showing better diffs though, and doesn&#x27;t handle comments on GitHub at all. Maybe there&#x27;s room here for us to combine our approaches :) Our email is support@difflens.com if you want to get in touch.
searchableguy将近 3 年前
This provides better UX but adds one more redirection when you are using github.<p>Do you support features like github suggestions which can be committed easily by author?<p>Given your history with Microsoft and their internal tool which this is inspired by, how long until github copies some of the ideas?<p>How many active users does this have?<p>Are there potential problems you see outside of current product?<p>I remember a startup providing paid code reviews as a service launched on HN a while ago. That could be a pivot for example in providing more value.
评论 #31844333 未加载
jhogervorst将近 3 年前
Nice idea! I&#x27;d be interested in giving it a try for our project in the future.<p>It does seem that the demo review is broken in Safari, I get a JS error and the UI doesn&#x27;t seem to work completely:<p>&gt; [Error] TypeError: e.connect is not a function. (In &#x27;e.connect(l,s)&#x27;, &#x27;e.connect&#x27; is undefined)<p>Also, is there any way to keep up-to-date on the project? I don&#x27;t see a newsletter or Twitter link on your homepage.
评论 #31852425 未加载
silverlake将近 3 年前
“You can comment anywhere in the file and on any text selection, even if it&#x27;s just one character.”<p>I’ve been looking for this feature forever. A changed line might impact code that wasn’t changed. There wasn’t a convenient way to comment on those. Looking forward to trying this.
paxys将近 3 年前
This looks fantastic! I&#x27;d love to try this out, but I don&#x27;t have admin access to the repo I work in and IT will definitely not approve a random new app. Any chance I can set this up with a personal access token instead?
评论 #31844184 未加载
gingerlime将近 3 年前
looks very interesting. a quick question about pricing: do we need to pay for all people in our github organization or can pick a few? we have some bot users, translator access, but only need the review tool for developers.
评论 #31845375 未加载
wnolens将近 3 年前
I also miss CodeFlow. At Amazon now and their review tool sucks.
perpil将近 3 年前
Nit: Couple typos on landing page: coversation, shorcut. Worth taking a pass with a spell checker.
评论 #31852910 未加载
decebalus1将近 3 年前
Oh wow, this looks great. Congratulations!
alephnan将近 3 年前
Are there plans for Gitlab?
http-teapot将近 3 年前
I am a bit at odd with the pricing. My team has 6 engineers and base price for Github is $24. Your product would increase our bill by $48, an increase of 200%. $48 is nothing compared to the salaries of 6 engineers but I am not convinced the feature set would make my team more productive.<p>If you told me that your solution help my team ship faster and saves an hour per engineer per week then that&#x27;s easy math: your product pays for itself.<p>Suggestions:<p><pre><code> - Make all base features free (the ones on your site currently) - Add analytics to your product, collect data and put it behind a paywall (entirely or partially by truncating historical data) - Iterate on premium features that improves critical metrics - Offer analytics with a trial of 2 to 3 months, enough time for graphs to speak for themselves - Make sure the gains are seen by the manager or business owner or whoever is the person in charge </code></pre> Pricing can be based on the average of hours saved.
评论 #31844877 未加载
评论 #31843504 未加载