Docs, reviewed.

Resolve

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.

Code only · separate chat tab
Doc Holiday / Review job
This view only shows Markdown as code. There’s no preview mode.
guides/authentication.mdmodified+2−1

@@ -1,4 +1,5 @@

3## Sessions
4−Your session stays active for 24 hours.
4+Sessions expire after 30 minutes of inactivity.
5+Use a refresh token to start a new session.
guides/quickstart.mdmodified+2−1

@@ -1,4 +1,5 @@

3## Create an API key
4−Create a key in your account settings.
4+Open Workspace settings → API keys.
5+Choose the minimum required permissions.

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

Rendered Markdown

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

Rendered Markdown

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.

guides/authentication.md

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.

authentication.md

Clarify the refresh instructions.

quickstart.md

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

guides/authentication.mdv1
Save the replacement refresh_token.

Use the new token for your next request.

Never expose tokens in client-side logs.

After revision

guides/authentication.mdv2
Refresh tokens are single-use credentials.
Store each newly issued refresh token before making another request.
Never expose tokens in client-side logs.

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

Activating a comment thread in code view: a 500-line file with 12 comments.
React render timeBeforeAfterChange
Activate a thread (code)356.9 ms52.9 ms↓ 85.2%
Select for a batch314.4 ms13.7 ms↓ 95.6%
Expand a file (warm cache)1,091.2 ms510.9 ms↓ 53.2%
Activate a thread (preview)135.2 ms135.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