Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
7f0ab56
feat: add reviewable suggested edits
3mdistal Sep 3, 2026
b8f9b33
fix: harden suggestion decision races
3mdistal Sep 3, 2026
04e0a27
merge: integrate current main for suggested edits
3mdistal Sep 3, 2026
c820218
fix: complete suggested edits review navigation
3mdistal Sep 3, 2026
d33a66d
Fix suggested edit visibility and review
3mdistal Sep 3, 2026
713e8a7
Merge remote-tracking branch 'origin/main' into HEAD
3mdistal Sep 4, 2026
2e7c9c5
fix: make suggested edits reviewable in place
3mdistal Sep 4, 2026
e8676ee
fix: preserve suggested edit drafts and comment review behavior
3mdistal Sep 8, 2026
93f2a38
Merge remote-tracking branch 'origin/main' into codex/content-suggest…
3mdistal Sep 8, 2026
f046e69
fix: checkpoint suggested edits review and safety repairs
3mdistal Sep 9, 2026
180b00d
fix: restore eased comment card translation
3mdistal Sep 10, 2026
91615a4
fix: preserve comment drafts and center review layout
3mdistal Sep 10, 2026
8dc7bf6
Merge main into content suggested edits
3mdistal Sep 10, 2026
60f5217
chore: publish branch work in templates/content (1 files)
3mdistal Sep 10, 2026
7183316
fix: close suggestion review and retry edge cases
3mdistal Sep 10, 2026
7fe4038
fix: preserve creation receipts across concurrent amendments
3mdistal Sep 10, 2026
b7da851
fix: complete editor SSR stub exports
3mdistal Sep 10, 2026
3ded3d8
fix: synchronize accepted suggestions across live editors
3mdistal Sep 10, 2026
8ed4069
chore: publish branch work in scripts/qa-standalone-chat-dev-smoke.ts…
3mdistal Sep 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/calm-pages-suggest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@agent-native/core": patch
---

Add a reusable, action-backed executable suggestion lifecycle for reviewable resources.
11 changes: 11 additions & 0 deletions .changeset/fix-collab-reconcile-peer-deadline.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@agent-native/toolkit": patch
---

Keep collaborative editors from briefly reverting edits received from another editor while SQL catches up, or indefinitely postponing accepted external content during presence updates.

Advance the edit baseline when peer-delivered content already matches an accepted snapshot, preventing false conflicts on subsequent edits.

Preserve subsequent local edits when an accepted replacement arrives through live sync before its saved revision, without treating identical shared changes as conflicts.

Receive collab-backed canonical revisions through fresh Yjs sync receipts instead of inserting the same accepted text again from SQL. Preserve local edits and the confirmed merge base across delayed or failed delivery.
5 changes: 5 additions & 0 deletions .changeset/fix-controlled-editor-toolbar-rollback.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@agent-native/toolkit": patch
---

Keep local rich-text changes from being rolled back while a controlled editor toolbar returns focus to the document.
5 changes: 5 additions & 0 deletions .changeset/fix-pglite-transaction-routing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@agent-native/core": patch
---

Keep transaction-scoped framework and app database reads on the active local PGlite transaction so review actions cannot stall the database.
5 changes: 5 additions & 0 deletions .changeset/fresh-collab-sync-receipts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@agent-native/core": patch
---

Expose explicit collaborative document sync receipts for fresh server catch-up requests.
5 changes: 5 additions & 0 deletions .changeset/pending-suggestion-amendments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@agent-native/core": patch
---

Allow authors to amend pending suggestions while preserving discussion and durable revision history, with revision checks protecting concurrent review decisions.
5 changes: 5 additions & 0 deletions .changeset/review-discussion-tools.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@agent-native/core": patch
---

Expose review reactions and personal thread preferences through the shared read/action hooks, preserve independently updated preferences, and honor muted threads when delivering reply notifications.
5 changes: 5 additions & 0 deletions .changeset/steady-suggestion-retries.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@agent-native/core": patch
---

Make suggestion creation and decision retries converge safely, and batch suggestion history reads.
5 changes: 5 additions & 0 deletions .changeset/stop-agent-chat-hmr-sweeps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@agent-native/core": patch
---

Stop retired development server instances from retaining agent sweep timers and MCP settings listeners after hot reloads.
5 changes: 5 additions & 0 deletions .changeset/tidy-editor-ssr-stubs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@agent-native/core": patch
---

Include editor transform and schema exports in browser-only SSR stubs so serverless Content builds succeed.
8 changes: 8 additions & 0 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,14 @@
"./review/actions/get-review-feedback": "./dist/review/actions/get-review-feedback.js",
"./review/actions/set-review-status": "./dist/review/actions/set-review-status.js",
"./review/actions/send-review-thread-to-agent": "./dist/review/actions/send-review-thread-to-agent.js",
"./review/actions/react-to-review-comment": "./dist/review/actions/react-to-review-comment.js",
"./review/actions/set-review-thread-unread": "./dist/review/actions/set-review-thread-unread.js",
"./review/actions/set-review-thread-muted": "./dist/review/actions/set-review-thread-muted.js",
"./review/suggestions/actions/create-resource-suggestion": "./dist/review/suggestions/actions/create-resource-suggestion.js",
"./review/suggestions/actions/update-resource-suggestion": "./dist/review/suggestions/actions/update-resource-suggestion.js",
"./review/suggestions/actions/list-resource-suggestions": "./dist/review/suggestions/actions/list-resource-suggestions.js",
"./review/suggestions/actions/get-resource-suggestion": "./dist/review/suggestions/actions/get-resource-suggestion.js",
"./review/suggestions/actions/decide-resource-suggestion": "./dist/review/suggestions/actions/decide-resource-suggestion.js",
"./comments-review/actions/list-review-comments": "./dist/review/actions/list-review-comments.js",
"./comments-review/actions/create-review-comment": "./dist/review/actions/create-review-comment.js",
"./comments-review/actions/reply-review-comment": "./dist/review/actions/reply-review-comment.js",
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/client/collab/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export {
type UseCollaborativeDocResult,
type CollabInitializationErrorCategory,
type CollabInitializationState,
type CollaborativeDocSyncResult,
} from "../../collab/client.js";
export { AGENT_CLIENT_ID } from "../../collab/agent-identity.js";
export {
Expand Down
7 changes: 7 additions & 0 deletions packages/core/src/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ export {
type UseCollaborativeDocResult,
type CollabInitializationErrorCategory,
type CollabInitializationState,
type CollaborativeDocSyncResult,
type CollabUser,
} from "../collab/client.js";
export { AGENT_CLIENT_ID } from "../collab/agent-identity.js";
Expand Down Expand Up @@ -224,6 +225,9 @@ export {
useCreateReviewComment,
useDeleteReviewComment,
useReplyReviewComment,
useReactToReviewComment,
useSetReviewThreadUnread,
useSetReviewThreadMuted,
useResolveReviewThread,
useReviewComments,
useReviewFeedback,
Expand All @@ -237,6 +241,9 @@ export {
type ListReviewCommentsParams,
type ListReviewCommentsResult,
type ReplyReviewCommentInput,
type ReactToReviewCommentInput,
type SetReviewThreadUnreadInput,
type SetReviewThreadMutedInput,
type ResolveReviewThreadInput,
type ReviewStatusBadgeProps,
type ReviewCommentComposerProps,
Expand Down
14 changes: 14 additions & 0 deletions packages/core/src/client/review/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,18 @@ export {
useCreateReviewComment,
useDeleteReviewComment,
useReplyReviewComment,
useReactToReviewComment,
useSetReviewThreadUnread,
useSetReviewThreadMuted,
useResolveReviewThread,
useReviewComments,
useReviewFeedback,
useSetReviewStatus,
useSendReviewThreadToAgent,
useResourceSuggestions,
useCreateResourceSuggestion,
useUpdateResourceSuggestion,
useDecideResourceSuggestion,
type ConsumeReviewFeedbackInput,
type CreateReviewCommentInput,
type DeleteReviewCommentInput,
Expand All @@ -32,7 +39,14 @@ export {
type ListReviewCommentsParams,
type ListReviewCommentsResult,
type ReplyReviewCommentInput,
type ReactToReviewCommentInput,
type SetReviewThreadUnreadInput,
type SetReviewThreadMutedInput,
type ResolveReviewThreadInput,
type SetReviewStatusInput,
type SendReviewThreadToAgentInput,
type ListResourceSuggestionsParams,
type CreateResourceSuggestionInput,
type UpdateResourceSuggestionInput,
type DecideResourceSuggestionInput,
} from "./use-review.js";
146 changes: 146 additions & 0 deletions packages/core/src/client/review/use-review.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
import { useQueryClient } from "@tanstack/react-query";

import type {
ResourceSuggestion,
SuggestionDecision,
SuggestionOperation,
SuggestionStatus,
} from "../../review/suggestions/types.js";
import type {
ReviewComment,
ReviewCommentKind,
ReviewDiscussionState,
ReviewThreadPreference,
ReviewMention,
ReviewResolutionTarget,
ReviewStatus,
Expand All @@ -19,6 +29,7 @@ export interface ListReviewCommentsParams {

export interface ListReviewCommentsResult {
comments: ReviewComment[];
discussion: ReviewDiscussionState;
reviewStatus: ReviewStatusEntry | null;
summary: {
openCount: number;
Expand Down Expand Up @@ -61,6 +72,75 @@ export interface ReplyReviewCommentInput {
metadata?: Record<string, unknown>;
}

export interface ReactToReviewCommentInput {
resourceType: string;
resourceId: string;
commentId: string;
reaction: string;
active: boolean;
}

export interface SetReviewThreadUnreadInput {
resourceType: string;
resourceId: string;
threadId: string;
unread: boolean;
}

export interface SetReviewThreadMutedInput {
resourceType: string;
resourceId: string;
threadId: string;
muted: boolean;
}

export function useReactToReviewComment() {
const queryClient = useQueryClient();
return useActionMutation<
{
commentId: string;
actorEmail: string;
reaction: string;
active: boolean;
},
ReactToReviewCommentInput
>("react-to-review-comment", {
skipActionQueryInvalidation: true,
onSuccess: () =>
queryClient.invalidateQueries({
queryKey: ["action", "list-review-comments"],
}),
});
}

export function useSetReviewThreadUnread() {
const queryClient = useQueryClient();
return useActionMutation<
ReviewThreadPreference & { threadId: string },
SetReviewThreadUnreadInput
>("set-review-thread-unread", {
skipActionQueryInvalidation: true,
onSuccess: () =>
queryClient.invalidateQueries({
queryKey: ["action", "list-review-comments"],
}),
});
}

export function useSetReviewThreadMuted() {
const queryClient = useQueryClient();
return useActionMutation<
ReviewThreadPreference & { threadId: string },
SetReviewThreadMutedInput
>("set-review-thread-muted", {
skipActionQueryInvalidation: true,
onSuccess: () =>
queryClient.invalidateQueries({
queryKey: ["action", "list-review-comments"],
}),
});
}

export interface ResolveReviewThreadInput {
resourceType: string;
resourceId: string;
Expand Down Expand Up @@ -95,6 +175,39 @@ export interface SetReviewStatusInput {
metadata?: Record<string, unknown>;
}

export interface ListResourceSuggestionsParams {
resourceType: string;
resourceId: string;
statuses?: SuggestionStatus[];
}

export interface CreateResourceSuggestionInput {
resourceType: string;
resourceId: string;
adapterKind: string;
baseRevision: string;
summary: string;
idempotencyKey: string;
operations: SuggestionOperation[];
metadata?: Record<string, unknown>;
}

export interface DecideResourceSuggestionInput {
id: string;
decision: SuggestionDecision;
idempotencyKey: string;
observedBase: string;
observedRevision?: number;
}

export interface UpdateResourceSuggestionInput {
id: string;
observedRevision: number;
idempotencyKey: string;
operations: SuggestionOperation[];
summary?: string;
}

export function useReviewComments(
params: ListReviewCommentsParams,
options?: { enabled?: boolean },
Expand Down Expand Up @@ -184,3 +297,36 @@ export function useSetReviewStatus() {
"set-review-status",
);
}

export function useResourceSuggestions(
params: ListResourceSuggestionsParams,
options?: { enabled?: boolean },
) {
return useActionQuery<{ suggestions: ResourceSuggestion[] }>(
"list-resource-suggestions",
params,
{
enabled:
options?.enabled ?? Boolean(params.resourceType && params.resourceId),
},
);
}

export function useCreateResourceSuggestion() {
return useActionMutation<ResourceSuggestion, CreateResourceSuggestionInput>(
"create-resource-suggestion",
);
}

export function useDecideResourceSuggestion() {
return useActionMutation<
{ suggestion: ResourceSuggestion; decision: unknown },
DecideResourceSuggestionInput
>("decide-resource-suggestion");
}

export function useUpdateResourceSuggestion() {
return useActionMutation<ResourceSuggestion, UpdateResourceSuggestionInput>(
"update-resource-suggestion",
);
}
Loading
Loading