[dev] [Marfuen] mariano/ai-policy-editor#2291
[dev] [Marfuen] mariano/ai-policy-editor#2291github-actions[bot] wants to merge 4 commits intomainfrom
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add pencil icon button to the accept/reject pill that opens an inline text input for per-hunk AI feedback. Submitting sends contextual feedback through the existing chat, shows a shimmer loading state for the targeted hunk, and remaps decisions when the proposal changes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…dates - Refactor `getLatestProposedPolicy` to `getLatestCompletedProposal` for better tracking of proposals across the entire conversation. - Update `PolicyContentManager` to utilize the new proposal fetching logic and manage proposal states more effectively. - Revamp `PolicyAiAssistant` UI to improve user interaction and feedback display. - Introduce confirmation for applying all changes in `ProposedChangesCard`, ensuring user intent is clear before executing bulk actions. - Update `.gitignore` to exclude new directories related to superpowers documentation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
PR SummaryMedium Risk Overview Improves proposal state handling so the latest completed Updates the policy chat backend to use Anthropic ( Written by Cursor Bugbot for commit 4ea9b82. This will update automatically on new commits. Configure here. |
| <div className="flex-[3] min-w-0 self-stretch"> | ||
| {/* Wide desktop (1536px+): AI assistant side panel */} | ||
| {aiAssistantEnabled && showAiAssistant && !isVersionReadOnly && activeTab === 'EDITOR' && isWideDesktop && ( | ||
| <div className="flex-[3] min-w-[320px] self-stretch"> |
There was a problem hiding this comment.
Wide desktop chat shows unfiltered hunk feedback messages
High Severity
The mobile/tablet PolicyAiAssistant receives displayMessages (which filters out internal per-hunk feedback messages containing the ___hunk_feedback___ marker), but the wide desktop PolicyAiAssistant receives raw messages. This means on wide desktop screens, users will see the raw internal feedback messages — including the ___hunk_feedback___ marker text — in the chat panel.
Additional Locations (1)
| } | ||
|
|
||
| // Re-create the patch using structuredPatch to get raw hunks with line-level data | ||
| const rawPatch = structuredPatch('f', 'f', originalText, '', '', '', { context: 1 }); |
There was a problem hiding this comment.
Unused rawPatch variable wastes computation in applySelectedHunks
Low Severity
rawPatch is assigned from structuredPatch('f', 'f', originalText, '', '', '', { context: 1 }) but never referenced anywhere. It also incorrectly diffs originalText against an empty string, suggesting this is leftover code from an abandoned approach. This dead code runs an unnecessary diff computation on every call to applySelectedHunks.
- Filter out hunks with only whitespace-only changes from the diff view - Merge adjacent skip blocks and no-change hunks into a single "Show N unchanged lines" section - Count changes by reviewable sections (hunks) instead of individual lines - Reject All now marks all hunks as rejected instead of clearing to pending - Strengthen system prompt to preserve unchanged text verbatim Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
There are 4 total unresolved issues (including 2 from previous reviews).
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
|
|
||
| const [showAiAssistant, setShowAiAssistant] = useState(false); | ||
| const isWideDesktop = useMediaQuery('(min-width: 1536px)'); | ||
| const isDesktop = useMediaQuery('(min-width: 1024px)'); |
There was a problem hiding this comment.
| const range = skipRanges.get(hunkIndex); | ||
| if (!range) return ''; | ||
| return originalLines.slice(range.start - 1, range.end).join('\n'); | ||
| } |
There was a problem hiding this comment.


This is an automated pull request to merge mariano/ai-policy-editor into dev.
It was created by the [Auto Pull Request] action.