fix(email-detail): make responsive evidence actions functional - #1245
fix(email-detail): make responsive evidence actions functional#1245seonghobae wants to merge 62 commits into
Conversation
|
Caution Review failedAn error occurred during the review process. Please try again later. 📝 WalkthroughWalkthroughEmailDetail now displays responsive participant and attachment metadata. Schedule-conflict emails provide a calendar writeback-intent action with loading and accessible status states. Repair scripts and guarded workflows apply and validate the related changes. ChangesEmail detail responsive action surface
PR 1245 repair automation
Estimated code review effort: 5 (Critical) | ~90 minutes Sequence Diagram(s)sequenceDiagram
participant RepairWorkflow
participant RepairTransformer
participant FrontendValidation
participant MaintenanceBranch
RepairWorkflow->>RepairTransformer: Verify anchors and apply staged repair
RepairWorkflow->>FrontendValidation: Run focused tests, full tests, typecheck, lint, coverage, and build
FrontendValidation-->>RepairWorkflow: Return validation results
RepairWorkflow->>MaintenanceBranch: Commit and push verified changes
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
|
@coderabbitai review @opencode-agent @cwl-noema-review exact-head review requested for |
|
|
|
@coderabbitai review exact current head |
|
|
|
@cwl-noema-review review exact current head |
|
@opencode-agent review-only exact current head |
|
@coderabbitai review @opencode-agent @cwl-noema-review exact-head review requested for |
|
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@frontend/src/components/EmailDetail.test.tsx`:
- Around line 1363-1369: Extend the EmailDetail scheduling tests around the
existing scheduleButton interaction to cover both disabled conditions: render
with no action items and assert the scheduling action is disabled, then use a
deferred writeback request to assert it is disabled while showing the loading
label. Keep the existing enabled-path assertion unchanged.
In `@frontend/src/components/EmailDetail.tsx`:
- Around line 684-687: Require a confirmed, server-authorized opaque
target_source_id before enabling the calendar sync action in EmailDetail and
pass it through handleSyncCalendar to /api/calendar/writeback-intent. Preserve
server-provided source provenance, explicitly handle target-source conflicts
instead of falling back to automatic selection, and update the integration test
to verify the selected source is used.
- Around line 643-645: Make the attachment container in EmailDetail.tsx a named
landmark by adding region semantics while preserving its accessible name “첨부파일”;
update the related EmailDetail.test.tsx assertion to query and verify the region
role and name, and update the specified doctoring record to document the
implemented landmark semantics.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 6a010206-4b50-4f8b-8edb-48020df87fe5
📒 Files selected for processing (4)
CHANGELOG.mddocs/doctoring/email-detail-responsive-action-surface.mdfrontend/src/components/EmailDetail.test.tsxfrontend/src/components/EmailDetail.tsx
|
PR governance metadata gate is not ready for
|
|
Exact current durable head: The one-shot repair writers and helpers are absent from the final five-file product diff. The durable tree passed the repair job's focused tests, full 432-test frontend suite, type checking, lint, coverage, and production build before publication. Calendar-source state is now keyed to the active email/actionable-summary context, so navigation cannot expose a stale selection while registry requests settle. Fresh current-head Application CI, container, dependency, Bandit, Semgrep, and Security Scan runs are in progress and remain mandatory. No pending or prior-head result is treated as success. @coderabbitai review |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
expected='e45fc3b16adb9bb7256a35061abbeaba33df1f3b'
repo='ContextualWisdomLab/naruon'
printf '=== Exact-head identity ===\n'
printf 'LOCAL_HEAD='; git rev-parse HEAD
printf 'EXPECTED=%s\n' "$expected"
printf 'EXPECTED_OBJECT='; git cat-file -t "$expected" 2>&1 || true
printf '\n=== PR metadata ===\n'
gh api "repos/$repo/pulls/1245" --jq \
'{number, state, draft, head: {sha: .head.sha, ref: .head.ref}, base: {sha: .base.sha, ref: .base.ref}, updated_at}'
printf '\n=== Checks for exact SHA ===\n'
gh api "repos/$repo/commits/$expected/check-runs?per_page=100" --jq \
'.check_runs[] | {name, status, conclusion, details_url, started_at, completed_at}' || true
base="$(git merge-base "$expected" origin/develop 2>/dev/null || git merge-base "$expected" develop)"
printf '\n=== Merge base ===\n%s\n' "$base"
printf '\n=== Changed paths ===\n'
git diff --name-status "$base...$expected"
printf '\n=== Diff stat ===\n'
git diff --stat "$base...$expected"
printf '\n=== Changed-file outlines ===\n'
git diff --name-only "$base...$expected" | while IFS= read -r path; do
printf '\n--- %s ---\n' "$path"
case "$path" in
*.ts|*.tsx|*.js|*.jsx)
ast-grep outline "$path" --items all 2>/dev/null || true
;;
*)
sed -n '1,220p' "$path"
;;
esac
done
printf '\n=== EmailDetail implementation ===\n'
sed -n '1,420p' frontend/src/components/EmailDetail.tsx 2>/dev/null || true
printf '\n=== EmailDetail tests ===\n'
sed -n '1,520p' frontend/src/components/EmailDetail.test.tsx 2>/dev/null || true
printf '\n=== Calendar writeback endpoint definitions and calls ===\n'
rg -n -C 12 --glob '*.{py,ts,tsx}' \
'/writeback-intent|writeback-intent|calendar.*sources|calendar.*source|CalendarSource' . || true
printf '\n=== Changed diff ===\n'
git diff --unified=60 "$base...$expected"Length of output: 141562 🏁 Script executed: #!/bin/bash
set -euo pipefail
log='/tmp/coderabbit-shell-logs/shell-output-jSJKO3'
expected='e45fc3b16adb9bb7256a35061abbeaba33df1f3b'
repo='ContextualWisdomLab/naruon'
printf '=== Prior exact-head and changed-path evidence ===\n'
rg -n -A25 -B2 '=== Exact-head identity ===|=== PR metadata ===|=== Checks for exact SHA ===|=== Changed paths ===|=== Diff stat ===' "$log" || true
printf '\n=== Fresh PR head and checks ===\n'
gh api "repos/$repo/pulls/1245" --jq '{head_sha: .head.sha, base_sha: .base.sha, state, updated_at}'
gh api "repos/$repo/commits/$expected/check-runs?per_page=100" --jq \
'.check_runs[] | [.name, .status, (.conclusion // "pending")] | `@tsv`' || true
printf '\n=== Exact changed paths ===\n'
base="$(git merge-base "$expected" origin/develop 2>/dev/null || git merge-base "$expected" develop)"
git diff --name-status "$base...$expected"
printf '\n=== Calendar source lifecycle implementation ===\n'
sed -n '100,230p' frontend/src/components/EmailDetail.tsx
sed -n '480,575p' frontend/src/components/EmailDetail.tsx
sed -n '680,810p' frontend/src/components/EmailDetail.tsx
printf '\n=== Calendar source types and ownership filter ===\n'
fd -t f . frontend/src/components/calendar | sort | while IFS= read -r path; do
case "$path" in
*types*|*helper*) printf '\n--- %s ---\n' "$path"; sed -n '1,260p' "$path" ;;
esac
done
printf '\n=== Tests for context change, stale registry responses, and source selection ===\n'
rg -n -C 8 --glob 'EmailDetail*.test.tsx' \
'contextKey|stale|late|unmount|summary.*change|actionable|selectedSourceId|selected.*source|writeback-sources' \
frontend/src/components
printf '\n=== New calendar writeback test tail ===\n'
sed -n '240,380p' frontend/src/components/EmailDetail.calendar-writeback.test.tsxLength of output: 72072
I found the declared five-file diff only. It contains no backend-policy, workflow, or repair-helper changes. The UI implementation meets the reviewed functional boundaries:
The new tests cover explicit source selection, disabled and pending controls, source conflict reset, partial intent failure, responsive evidence DOM properties, and writeback payloads. I found no blocking code defect in the static review. I cannot mark the PR ready to merge yet. The exact-head
|
|
@coderabbitai review Please review the exact live head only. Verify mobile and desktop participant/attachment evidence remains available, the horizontally scrollable attachment region has an accessible name, the meeting-conflict action uses the existing calendar writeback-intent API with exact source and loading/disabled/live-status behavior, and unrelated backend identity/tenant policy is unchanged. Require current frontend lint/typecheck/tests/coverage/build, Application CI, security gates, and zero unresolved threads. Review only; do not update the branch, merge, release, or alter protections. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
repo='ContextualWisdomLab/naruon'
pr='1245'
echo '=== Live PR metadata ==='
pr_json="$(gh api "repos/$repo/pulls/$pr")"
printf '%s\n' "$pr_json" | jq '{number,state,draft,head:{sha:.head.sha,ref:.head.ref},base:{sha:.base.sha,ref:.base.ref},updated_at,mergeable,mergeable_state}'
head="$(printf '%s\n' "$pr_json" | jq -r '.head.sha')"
base_ref="$(printf '%s\n' "$pr_json" | jq -r '.base.ref')"
echo "LIVE_HEAD=$head"
echo '=== Live-head check runs ==='
gh api "repos/$repo/commits/$head/check-runs?per_page=100" --paginate \
--jq '.check_runs[] | {name,status,conclusion,started_at,completed_at,details_url}' || true
echo '=== PR review decision and review-thread state ==='
gh api graphql -F owner='ContextualWisdomLab' -F name='naruon' -F number="$pr" -f query='
query($owner:String!, $name:String!, $number:Int!) {
repository(owner:$owner,name:$name) {
pullRequest(number:$number) {
reviewDecision
reviews(first:100) { nodes { author { login } state commit { oid } submittedAt } }
reviewThreads(first:100) { nodes { isResolved isOutdated path line comments(first:20) { nodes { author { login } body } } } }
}
}
}' > /tmp/pr1245-review.json
jq '{
reviewDecision:.data.repository.pullRequest.reviewDecision,
unresolvedThreads:[
.data.repository.pullRequest.reviewThreads.nodes[]
| select(.isResolved == false)
| {path,line,isOutdated,authors:[.comments.nodes[].author.login]}
],
reviews:[
.data.repository.pullRequest.reviews.nodes[]
| {author:.author.login,state,commit:(.commit.oid // null),submittedAt}
]
}' /tmp/pr1245-review.json
echo '=== Exact-head scope ==='
git fetch origin "$base_ref" "$head" --quiet 2>/dev/null || true
merge_base="$(git merge-base "$head" "origin/$base_ref" 2>/dev/null || git merge-base "$head" "$base_ref")"
printf 'MERGE_BASE=%s\n' "$merge_base"
git diff --name-status "$merge_base...$head"
echo '--- Backend, identity, tenant, policy, workflow, and infrastructure paths in scope ---'
git diff --name-only "$merge_base...$head" \
| rg -n -i '(^backend/|^server/|identity|tenant|policy|^\.github/|Dockerfile|docker-compose)' || true
echo '=== Exact-head diff: EmailDetail and tests ==='
git diff --unified=70 "$merge_base...$head" -- \
frontend/src/components/EmailDetail.tsx \
frontend/src/components/EmailDetail.test.tsx \
frontend/src/components/EmailDetail.calendar-writeback.test.tsx \
docs/doctoring/email-detail-responsive-action-surface.md \
CHANGELOG.md
echo '=== Current EmailDetail structure and relevant implementation ==='
ast-grep outline frontend/src/components/EmailDetail.tsx --items all 2>/dev/null || true
rg -n -C 14 \
'첨부파일|attachment|participant|참여자|일정 조율|writeback-intent|target_source_id|selectedSourceId|role="status"|aria-live|aria-busy|disabled' \
frontend/src/components/EmailDetail.tsx || true
echo '=== Current regression-test evidence ==='
rg -n -C 8 \
'첨부파일|attachment|participant|참여자|일정 조율|writeback-intent|target_source_id|selectedSourceId|role="status"|aria-live|disabled|pending|loading|conflict' \
frontend/src/components/EmailDetail.test.tsx \
frontend/src/components/EmailDetail.calendar-writeback.test.tsx 2>/dev/null || true
echo '=== Calendar writeback API definitions and adjacent contract ==='
rg -n -C 16 --glob '*.{py,ts,tsx}' \
'/api/calendar/writeback-intent|writeback-intent|target_source_id|calendar.*source' \
. || trueLength of output: 201532 🏁 Script executed: #!/bin/bash
set -euo pipefail
log='/tmp/coderabbit-shell-logs/shell-output-x4V9CX'
repo='ContextualWisdomLab/naruon'
pr='1245'
echo '=== Captured live-head metadata, checks, review state, and scope ==='
rg -n -A180 -B2 \
'=== Live PR metadata ===|=== Live-head check runs ===|=== PR review decision and review-thread state ===|=== Exact-head scope ===|=== Exact-head diff: EmailDetail and tests ===' \
"$log" | head -900
pr_json="$(gh api "repos/$repo/pulls/$pr")"
head="$(printf '%s\n' "$pr_json" | jq -r '.head.sha')"
base_ref="$(printf '%s\n' "$pr_json" | jq -r '.base.ref')"
git fetch origin "$base_ref" "$head" --quiet 2>/dev/null || true
merge_base="$(git merge-base "$head" "origin/$base_ref" 2>/dev/null || git merge-base "$head" "$base_ref")"
echo '=== Current live-head identity, scope, and checks ==='
printf '%s\n' "$pr_json" | jq '{head_sha:.head.sha,base_ref:.base.ref,updated_at,state,mergeable,mergeable_state}'
printf 'MERGE_BASE=%s\n' "$merge_base"
git diff --name-status "$merge_base...$head"
gh api "repos/$repo/commits/$head/check-runs?per_page=100" --paginate \
--jq '.check_runs | group_by(.conclusion) | map({conclusion:(.[0].conclusion // "pending"), names:map(.name)})' || true
echo '=== Current unresolved review threads ==='
gh api graphql -F owner='ContextualWisdomLab' -F name='naruon' -F number="$pr" -f query='
query($owner:String!, $name:String!, $number:Int!) {
repository(owner:$owner,name:$name) {
pullRequest(number:$number) {
reviewDecision
reviewThreads(first:100) {
nodes {
isResolved isOutdated path line
comments(first:1) { nodes { author { login } body } }
}
}
}
}
}' | jq '{
reviewDecision:.data.repository.pullRequest.reviewDecision,
unresolved:[
.data.repository.pullRequest.reviewThreads.nodes[]
| select(.isResolved == false)
| {path,line,isOutdated,author:.comments.nodes[0].author.login,body:.comments.nodes[0].body}
]
}'
echo '=== EmailDetail evidence, controls, and status markup ==='
sed -n '680,830p' frontend/src/components/EmailDetail.tsx
sed -n '480,590p' frontend/src/components/EmailDetail.tsx
echo '=== Calendar source filter and server endpoint definition ==='
rg -n -C 12 --glob '*.{ts,tsx}' 'function isCustomerOwnedWritableSource|const isCustomerOwnedWritableSource|isCustomerOwnedWritableSource' frontend/src
rg -n -C 40 --glob '*.py' '@.*writeback-intent|writeback-intent' backend | head -500
echo '=== Doctoring document ==='
sed -n '1,240p' docs/doctoring/email-detail-responsive-action-surface.mdLength of output: 111985 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo '=== Meeting-conflict action and status markup ==='
rg -n -C 18 \
'isCalendarWritebackDisabled|handleSyncCalendar|isSyncing|syncStatus|role="status"|aria-live="polite"|aria-busy' \
frontend/src/components/EmailDetail.tsx
echo '=== Direct tests for responsive evidence and accessibility states ==='
rg -n -C 8 \
'role="region"|aria-label="첨부파일"|participant|참여자|aria-busy|role="status"|aria-live|disabled|조율 중' \
frontend/src/components/EmailDetail.test.tsx \
frontend/src/components/EmailDetail.calendar-writeback.test.tsxLength of output: 40975
I found no blocking defect in the reviewed UI implementation.
Current live-head validation evidence is sufficient for frontend, coverage, image validation, dependency, and security checks. The successful checks include This PR is not ready to merge:
I did not run frontend tests, lint, type checking, coverage, or the production build in this sandbox. You are interacting with an AI system. |
|
Current head |
Buyer-visible gap
The EmailDetail screen exposed participant and attachment evidence inconsistently across viewport sizes, and the meeting-conflict panel rendered an action that was not connected to the existing calendar writeback-intent boundary.
Change
일정 조율to the existing calendar writeback-intent API;Replacement rationale
This maintainer-owned branch is a one-commit, four-file reconstruction of the validated product tree from #1243 on exact current
develop(be3bedb4bc5f264c9d621e2666b8583b3b149eca). The original Jules lineage producedaction_requiredrather than executable GitHub Actions jobs. No result or approval from #1243 is reused here; this PR must establish its own exact-head checks and review evidence.Exact-head gate
Current exact head:
8f7ff8b164de60af321b81f78c024fd7996b95aa.Merge only after Application CI, frontend lint/type checking/tests/coverage/build, Bandit, Semgrep, Security Scan, Dependency Review, container build, fresh automated review, qualifying independent approval, zero unresolved actionable threads, and every repository protection rule succeed on this SHA.
Summary by CodeRabbit