fix(email-detail): make responsive evidence actions functional - #1245
fix(email-detail): make responsive evidence actions functional#1245seonghobae wants to merge 64 commits into
Conversation
📝 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 |
Add pass-through act-warning regression guard: RED4fail22pass then focused30pass. Strict lint reproduces omitted context-dependent callback and passes after dependency repair. Full442 tests retain separate Calendar warnings and incomplete coverage; no suppression, unrelated changes, PR closure, or visual-completion claim. Co-Authored-By: Codex <noreply@openai.com>
|
경고 근본 수리885ee0c266c74cda5a19635cbc47ab6d33b488cf를 기존 branch에 일반push했습니다. 원래796b34c5는26테스트exit0이지만4act경고가 있었습니다. 원래 console.error 출력을 유지하는 afterEach 검사만 추가하면4fail22pass RED;4native입력setter/event를 await act로 감싸면 관련30테스트가 경고 없이 통과합니다. 같은컴포넌트의context-dependent setSelectedWritebackSourceId 콜백 의존성 누락도 strictlint exit1로 재현한 뒤1line으로 수리했습니다. 커밋후strictfocused30pass/strictlintexit0 확인,전체strictlint/typecheck/build도exit0. 전체coverage52파일442테스트exit0이지만 별도Calendaract3개가 남았고 lines86.76%,statements84.06%,functions85.67%,branches75.18%로100%미달입니다. AGENTS와기존doctoring에한국어절차/RCA/React공식APA를기록했습니다. 다른PRdelta를버리거나경고를숨기지않았으며 Draft/현재VI미완료/보호병합미완료를유지합니다. Context7quota로공식React문서를대체근거로확인했습니다. |
Preserve existing1244/1571 patches and1245 UI/act repair through normal merge. No force rewrite or PR closure; new-head verification remains separate.
|
Dependency integration receipt for 38c375e: normal merge of EmailDetail repair 885ee0c and #1244 dependency head 156a816; base retargeted to #1244. Relative to that base only six UI/documentation files remain; backend and unrelated inherited changes match the base. Frozen pnpm install, strict focused ESLint and 32 focused tests exited 0. Expanded tracked-head archive Trivy MEDIUM/HIGH/CRITICAL fixable vuln/secret/misconfig scan exited 0, 11 language manifests and zero findings. JSON SHA256 772d5b7e5a4c5c615cccf72612db807205f1b3d1ce5309f8e5fec3385b33c955. This is local head evidence, not hosted checks, merge-ref validation, visual inspection or protected merge. Successor #1488 preserves this delta and adds the Calendar warning repair. |
Preserve the current Calendar source, focused regressions, and render-warning doctoring while restoring the exact #1245 parent tree for EmailDetail, dependency security, CHANGELOG, AGENTS, and Strix dependency contracts. Keep all intervening history; no force rewrite or evidence transfer.
P2: await the Calendar source-registry effect in the first rendering testOwner handoff; no duplicate runtime/test implementation was added to #1352. Current #1245 head Observed reproduction is on #1352's unmodified parent Use the existing asynchronous test/ corepack pnpm exec vitest run --maxWorkers=1 src/app/calendar/page.test.tsxThen retain the full-suite check and warning gate. Avoid starting another full build/test concurrently with the active shared-host build. Evidence: parent log |
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