Skip to content

perf(chore): simplify sent grouping, memoize email rows, remove local artifacts - #1214

Closed
seonghobae wants to merge 16 commits into
developfrom
bolt/optimize-has-sent-message-1619297502038066172
Closed

perf(chore): simplify sent grouping, memoize email rows, remove local artifacts#1214
seonghobae wants to merge 16 commits into
developfrom
bolt/optimize-has-sent-message-1619297502038066172

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

변경 사항

  • backend/api/emails.pyhas_sent_message를 값이 항상 True인 딕셔너리에서 집합으로 변경해 존재 여부 추적 의도를 명확히 했습니다.
  • frontend/src/components/EmailList.tsx의 이메일 행 배열을 useMemo로 구성해 동일한 목록·선택·콜백 입력에서는 기존 요소 배열을 재사용하도록 했습니다.
  • 실수로 커밋된 로컬 개발 로그(frontend/dev.log)와 일회성 수동 스크린샷 스크립트(screenshot.mjs)를 제거했습니다.

검증

  • Application CI
  • Dependency Review
  • Security Scan / Bandit / Semgrep
  • Docker image validation

기존 #1191의 EmailList 변경은 이 PR이 대체합니다.

Summary by CodeRabbit

  • Bug Fixes

    • Improved filtering of sent-message threads for more accurate email results.
  • Performance

    • Reduced unnecessary email list updates for a smoother interface.
  • Chores

    • Removed an unused screenshot utility.

- boolean 존재 여부만 추적하는 딕셔너리를 set으로 변경하여 의미를 명확히 하고 메모리 사용량을 약간 절감
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 24 seconds

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: ff8c6bdc-f35b-448c-a081-ef085e83d72f

📥 Commits

Reviewing files that changed from the base of the PR and between 0daf30c and 956e080.

⛔ Files ignored due to path filters (1)
  • frontend/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (14)
  • .jules/palette.md
  • backend/api/auth.py
  • backend/api/dav.py
  • backend/api/tenant_config.py
  • backend/core/config.py
  • backend/tests/conftest.py
  • backend/tests/test_tenant_config_api.py
  • frontend/package.json
  • frontend/src/app/search/page.test.tsx
  • frontend/src/components/SourceDrawer.tsx
  • frontend/src/components/calendar/CalendarMonthView.tsx
  • frontend/src/components/calendar/CalendarSidebarRight.tsx
  • scripts/ci/pr_governance_gate.sh
  • scripts/ci/test_pr_governance_gate.sh
📝 Walkthrough

Walkthrough

The email API now tracks sent threads with a set. EmailList memoizes mapped list elements. The screenshot.mjs browser-capture script was deleted.

Changes

Email updates

Layer / File(s) Summary
Sent-thread set tracking
backend/api/emails.py
Sent-thread detection now uses set insertion and direct membership checks.
Memoized email list rendering
frontend/src/components/EmailList.tsx
Email list elements are memoized using the email data, selected email ID, and selection callback.
Screenshot script removal
screenshot.mjs
The Chromium screenshot script was deleted.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: copilot

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: sent grouping simplification, email row memoization, and local artifact removal.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bolt/optimize-has-sent-message-1619297502038066172

Comment @coderabbitai help to get the list of available commands.

@seonghobae seonghobae changed the title ⚡ Bolt: [성능 개선] emails.py 내 has_sent_message 딕셔너리를 set으로 변경 perf(chore): simplify sent grouping, memoize email rows, remove local artifacts Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

seonghobae and others added 2 commits August 3, 2026 01:00
- boolean 존재 여부만 추적하는 딕셔너리를 set으로 변경하여 의미를 명확히 하고 메모리 사용량을 약간 절감

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@seonghobae
seonghobae marked this pull request as draft August 3, 2026 02:48
@seonghobae
seonghobae marked this pull request as ready for review August 3, 2026 02:48

@seonghobae seonghobae left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current-head maintenance verification completed: production changes are scoped to sent-thread membership representation, memoized row construction, and removal of committed local artifacts. Required GitHub Actions are green. Requesting central review evidence refresh for this immutable head.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please re-review the immutable current head d5d56fd4f2ce97e7428ba22b73a4a0c4fc10fbb3. All repository Actions checks are green and there are no unresolved review threads.

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

@seonghobae I will perform a complete re-review of the current head d5d56fd4f2ce97e7428ba22b73a4a0c4fc10fbb3. I will review all changes, not only new commits.

✅ Action performed

Full review finished.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 42 minutes.

@seonghobae seonghobae left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current head d5d56fd4f2ce97e7428ba22b73a4a0c4fc10fbb3 has no unresolved review thread and every repository-local required workflow is successful. Re-triggering current-head OpenCode evidence and merge scheduling without changing the immutable head.

@seonghobae
seonghobae marked this pull request as draft August 3, 2026 05:07
@seonghobae
seonghobae marked this pull request as ready for review August 3, 2026 05:07

@seonghobae seonghobae left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commercialization-loop current-head revalidation: d5d56fd4f2ce97e7428ba22b73a4a0c4fc10fbb3 remains mergeable, has zero review threads, and all six repository-local workflows are successful. Re-triggering the central independent-review and guarded merge scheduler for this exact head.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please perform a complete review of the current head 004808f819a0b3bb1248f90627994a420597095c. The branch is refreshed onto current develop, has zero review threads, and the final scope is sent-thread set membership, memoized email rows, and deletion of committed local artifacts.

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

@seonghobae I will perform a complete review of the current head 004808f819a0b3bb1248f90627994a420597095c. I will review all changes in the stated final scope.

✅ Action performed

Full review finished.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 4 minutes.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

The included-review cooldown has elapsed. Please perform the complete current-head review for 004808f819a0b3bb1248f90627994a420597095c and submit it against that exact commit.

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

@seonghobae I will perform a complete review of current head 004808f819a0b3bb1248f90627994a420597095c. I will review the full final scope against that commit.

✅ Action performed

Full review finished.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 30 seconds.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

The included-review cooldown is now clear. Please perform the complete current-head review for 004808f819a0b3bb1248f90627994a420597095c and submit it against that exact commit.

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

@seonghobae I will perform a complete review against commit 004808f819a0b3bb1248f90627994a420597095c.

✅ Action performed

Full review finished.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 48 minutes.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

PR governance metadata gate is not ready for 956e080c95e60d2f53a922659cc9df35695a4b16:

  • Review decision is CHANGES_REQUESTED; address requested changes before merge.
  • Required check validate backend image is FAILURE on the current head.
  • Required check validate frontend image is FAILURE on the current head.
  • Required check validate naruon image is FAILURE on the current head.
  • Required check frontend is FAILURE on the current head.
  • Required check trivy-fs is FAILURE on the current head.

seonghobae and others added 4 commits August 3, 2026 22:57
- GitHub Actions trivy-fs job failed with CVE-2026-69153 in postcss. Bumping it to patched version 8.5.25.
💡 무엇을:
- WebDAV 경로 처리 시 url 디코딩 전에 %2e, %2f, %5c 등의 path traversal 우회 문자가 있는지 검사하도록 변경했습니다.
- Admin 권한의 경우 override 세션 대신 오직 server 세션만 허용되도록 검증을 강화했습니다.
- OAuth Redirect URI에 대해 사전에 구성된 환경변수(ALLOWED_OAUTH_REDIRECT_URIS) 화이트리스트 검증을 추가했습니다.
- OIDC JWKS 공개키를 캐싱하기 전에 명시적으로 RS256 알고리즘(alg) 검증을 추가했습니다.

🎯 왜:
- STRIX 보안 진단에서 지적된 인증, 인가 및 path traversal 관련 취약점을 완화하기 위함입니다.
- 공격자가 임의의 리디렉션 URI, 잘못된 JWKS 키, 혹은 조작된 경로를 악용하는 것을 방지합니다.

✅ 검증 방법:
- backend tests 를 수행하여 보안 검증 및 기능 호환성을 확인했습니다.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 956e080c95e60d2f53a922659cc9df35695a4b16.

  • Head SHA: 956e080c95e60d2f53a922659cc9df35695a4b16

  • Workflow run: 30878336892

  • Workflow attempt: 1

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (2 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (2 files)"]
  R1 --> V1["required checks"]
  Evidence --> S2["Backend (15 files)"]
  S2 --> I2["API and service runtime"]
  I2 --> R2["Review risk: Backend (15 files)"]
  R2 --> V2["backend tests"]
  Evidence --> S3["Docs: README.md"]
  S3 --> I3["operator or user guidance"]
  I3 --> R3["Review risk: Docs: README.md"]
  R3 --> V3["docs review"]
  Evidence --> S4["Frontend (9 files)"]
  S4 --> I4["browser runtime and bundle"]
  I4 --> R4["Review risk: Frontend (9 files)"]
  R4 --> V4["frontend tests"]
  Evidence --> S5["CI script (2 files)"]
  S5 --> I5["review and security gate shell path"]
  I5 --> R5["Review risk: CI script (2 files)"]
  R5 --> V5["bash -n plus Strix self-test"]
Loading

@opencode-agent

opencode-agent Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 956e080c95e60d2f53a922659cc9df35695a4b16
  • Workflow run: 30878336892
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 956e080c95e60d2f53a922659cc9df35695a4b16.

  • Head SHA: 956e080c95e60d2f53a922659cc9df35695a4b16

  • Workflow run: 30878336892

  • Workflow attempt: 1

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (2 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (2 files)"]
  R1 --> V1["required checks"]
  Evidence --> S2["Backend (15 files)"]
  S2 --> I2["API and service runtime"]
  I2 --> R2["Review risk: Backend (15 files)"]
  R2 --> V2["backend tests"]
  Evidence --> S3["Docs: README.md"]
  S3 --> I3["operator or user guidance"]
  I3 --> R3["Review risk: Docs: README.md"]
  R3 --> V3["docs review"]
  Evidence --> S4["Frontend (9 files)"]
  S4 --> I4["browser runtime and bundle"]
  I4 --> R4["Review risk: Frontend (9 files)"]
  R4 --> V4["frontend tests"]
  Evidence --> S5["CI script (2 files)"]
  S5 --> I5["review and security gate shell path"]
  I5 --> R5["Review risk: CI script (2 files)"]
  R5 --> V5["bash -n plus Strix self-test"]
Loading

Copy link
Copy Markdown
Contributor Author

Closing this branch instead of weakening the gates. Against current develop, the branch is 8 commits behind and its effective diff deletes the DiskSage readiness implementation/tests, delegated-RBAC tests, threading research/tests, and accessibility coverage, while the advertised has_sent_message set conversion and EmailList memoization are no longer present. The 29-file destructive drift is not a safe vehicle for the intended four-file optimization. The valid product changes must be recreated from current develop as a clean, focused PR.

@seonghobae seonghobae closed this Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant