Conversation
|
|
Warning Review limit reached
Next review available in: 53 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (11)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c0d0a64a9c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const state = context.readme.find((s) => s.path === path) | ||
| const seed = state?.state === 'present-declared' || state?.state === 'present-undeclared' ? state.content : '' | ||
| onRequestEditor?.({ kind: 'readme', path, option, content: seed }) |
There was a problem hiding this comment.
Seed newly created README content from facet identity
When both README paths are absent and the author selects Create, this branch supplies '' to the external editor instead of the identity-derived template. As a result, accepting the editor unchanged creates and declares an empty README, despite readmeSeedContent specifically defining the template for absent states and the intended create flow seeding README content from the facet name and description. Use readmeSeedContent(state, form.fields.name.value, form.fields.description.value) here as well, while retaining existing bytes for present files.
Useful? React with 👍 / 👎.
|
| const handleReadmeEdit = useCallback( | ||
| (path: ReadmePath, option: ReadmeActionOption) => { | ||
| const state = context.readme.find((s) => s.path === path) | ||
| const seed = state?.state === 'present-declared' || state?.state === 'present-undeclared' ? state.content : '' | ||
| onRequestEditor?.({ kind: 'readme', path, option, content: seed }) | ||
| }, | ||
| [context.readme, onRequestEditor], |
There was a problem hiding this comment.
Editor seeded with empty string for
create
handleReadmeEdit computes the seed content with a manual state check that returns '' for anything other than present-declared or present-undeclared. The create option is only offered for absent-undeclared state, so it falls into the else branch and opens the external editor with an empty buffer. readmeSeedContent is already imported and handles absent-undeclared by returning readmeTemplate(name, description) — the same template the PR description says create should be seeded from. The fix is to call readmeSeedContent(state, form.fields.name.value, form.fields.description.value) here (matching handleReadmeResolve), and add form.fields.name.value and form.fields.description.value to the useCallback dependency array.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a738ae8. Configure here.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a738ae81c3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const options = useMemo(() => readmeActionOptions(state), [state]) | ||
|
|
||
| const selectedKind = action ? readmeOptionKindFor(action) : null | ||
| const selectedIndex = selectedKind ? options.findIndex((o) => o.kind === selectedKind) : -1 |
There was a problem hiding this comment.
Let authors clear a queued README action
After an author selects Adopt, Create, Edit, Remove, or another README action, this row offers only the non-none options and onSelect can never clear the stored action. Thus an author who changes their mind while continuing to edit other fields cannot restore “leave as-is”; the prior README mutation remains queued and will be applied. Add an explicit leave/clear path that removes or replaces the action with none.
Useful? React with 👍 / 👎.
28c186f to
a27000a
Compare
a738ae8 to
d2de027
Compare
Merge activity
|
…rip integration for both conventional paths
d2de027 to
9ba621d
Compare


Why
Task 13.4: each of the two conventional README paths (
README.mdandREADME) now has its own independent tagged action state, managed separately rather than merged into a single choice. This ensures scaffold, edit, removal, and declaration changes are always applied to the exact path the author acted on, and that adopting an existing file preserves its bytes structurally (no file write is ever queued foradopt).Details
A new
ReadmeActiondiscriminated union inreadme-actions.tsis the single source of truth for what can happen to a README path. Each variant is only constructible for states that permit it —readmeActionOptionsreturns the legal options per state, andreadmeActionFormaps a chosen option kind back to the tagged action, so an illegal state/action pairing cannot be represented.The two paths are tracked independently in
useEditSessionvia areadmeActions: Map<ReadmePath, ReadmeAction>alongside the existingresolutionsmap.buildResultfilters outnoneactions, applies declaration deltas viaapplyReadmeDeclaration, and emits file operations viareadmeFileOperations— these two concerns are kept separate so adoption never queues a write.A new
readmephase is inserted into the edit wizard between reconciliation and editing, rendered byReadmePanelView. Each row shows the path's current on-disk/declaration state and its legal options; left/right arrows move the highlight and Enter selects. Content-bearing options (edit,edit-and-adopt,create) route to the external editor via the existing round-trip mechanism. TheEditEditorRequesttype is now a tagged union (asset-description|readme) so the command runner'sapplyEditorRoundTripfunction handles each arm correctly — a cancelled editor for a README path queues nothing rather than writing empty content.readmeSeedContentprovides the editor seed: existing bytes for present files, or the facet identity template for absent ones, sharing the same template used by create.Verification
New unit tests in
edit-supplementary.test.tscoverreadmeActionOptionsfor all four states, and each action variant's declaration delta and file operations — including the structural byte-preservation guarantee foradoptand the round-trip ofreadmeOptionKindFor.Note
Medium Risk
Changes manifest
filesand on-disk supplementary paths during edit/create flows, but behavior is constrained by tagged actions, transactional apply, and broad new test coverage.Overview
Adds engine-level README authoring via a
ReadmeActiondiscriminated union inreadme-actions.ts, with state-specific options, separate manifest declaration updates (applyReadmeDeclaration) and exact-path file ops (readmeFileOperations). Adopt only updatesfilesand never queues a write, so on-disk bytes stay intact.The edit TUI gains a dedicated
readmephase (ReadmePanelView) between reconciliation and asset editing.README.mdand extensionlessREADMEare tracked independently inuseEditSession(readmeActionsmap). Content choices use a taggedEditEditorRequest(asset-description|readme); cancelling the external editor leaves README paths unchanged.Confirmation shows queued README writes/deletes by exact path (via existing
previewEditOperations). E2E create tests cover scaffold/build with an enabled README and headless default--no-readmebehavior. OpenSpec tasks 13.4, 13.7, and 13.8 are marked complete.Reviewed by Cursor Bugbot for commit 9ba621d. Bugbot is set up for automated code reviews on this repo. Configure here.