Docs, reviewed.
Doc updates an existing API property description. Inspecting the example PR shows that expires_in is in seconds, with a default of 1800. The reviewer asks Doc to clarify the unit and default. Doc updates the wording, then the reviewer resolves the thread. Use the previous and next step buttons to revisit each state.
fakegithub.com
PR #142 · Configurable session lifetimes
src/api/sessions.ts
const lifetimeSeconds = request.expires_in ?? 1800;
const expiresAt = now + lifetimeSeconds * 1000;The fallback is 1,800 seconds. Multiplying by 1,000 converts seconds to milliseconds before calculating the expiry time.
The description should name both the unit and the default.
Context
Doc Holiday uses AI to generate and update software documentation from code changes, pull requests, and issues; reviews originally paired a diff with a separate job-level chat.
Writers had to review Markdown as code and switch tabs to ask questions. I added a rendered preview and comments beside the document, so they could review the wording and discuss a change together.
I designed the interaction and built the UI. Another engineer developed the agent reasoning. All of this shipped; these portfolio demos simplify the interface and remove surrounding product context.
guides/authentication.mdmodified+2−1
@@ -1,4 +1,5 @@
guides/quickstart.mdmodified+2−1
@@ -1,4 +1,5 @@
Designing the review
Keep the document in one piece.
The first approach placed threads below their selected lines, like a GitHub review. Turns out technical writers hate GitHub’s interface. I moved them into a gutter to keep discussion close without breaking the document’s reading flow.
Initial approach · inline
Sessions
− Active for 24 hours.
+ Expires after 30 minutes.
Morgan
What counts as inactivity?
Use a refresh token to sign in again.
Shipped approach · gutter
Sessions
− Active for 24 hours.
+ Expires after 30 minutes.
Use a refresh token to sign in again.
Morgan
What counts as inactivity?Making room for the constraints.
The patterns had to keep the document readable, prevent conflicting requests, and handle comments whose text had changed or disappeared after a revision.
A gutter that makes room.
Expanded threads compete for space. The active comment stays beside its source while neighbors move, preserving the reader’s place in the document.
Clarify the refresh instructions.
Start with read-only permissions.
Send several requests at once.
Batch comments instead of waiting for Doc to finish each request before sending the next. Doc handles one batch at a time to avoid conflicting edits across threads.
Before revision
Use the new token for your next request.
After revision
Follow the words, not the number.
Comments follow their text as the document changes. If that text is rewritten or removed, the comment becomes outdated and keeps its original quote for context.
Performance
It worked. Then our CEO opened it.
A decade-old Windows machine made my laptop at 40× CPU throttling look fast. I memoized diff rows, stabilized their callbacks, and separated layout updates from the document’s rendering state.
before
356.9 ms
Median React render time
701 diff-row renders
after
52.9 ms
↓ 85.2%Median React render time
1 diff-row render
| React render time | Before | After | Change |
|---|---|---|---|
| Activate a thread (code) | 356.9 ms | 52.9 ms | ↓ 85.2% |
| Select for a batch | 314.4 ms | 13.7 ms | ↓ 95.6% |
| Expand a file (warm cache) | 1,091.2 ms | 510.9 ms | ↓ 53.2% |
| Activate a thread (preview) | 135.2 ms | 135.3 ms | ↑ 0.1% |
The biggest gains were in code view and batch selection. Preview-mode comment activation was effectively unchanged.
How this was measured
15 measured runs after 3 warmups per interaction, 4× CPU throttling, Chrome 156.0.8078.48, Apple M2. Identical seeded data and local file responses, comparing the commits immediately before and after the rendering optimization.
These are local React Profiler measurements from production profiling builds, which add instrumentation overhead. They measure rendering work, not end-to-end latency or performance on the original Windows machine.
View the measurements