Skip to content

fix(resume): PDFのプロジェクト見出しがページ跨ぎで繰り返すのを解消#434

Merged
yusuke0610 merged 1 commit into
mainfrom
feat/resume-pdf-no-repeat-project-header
Jun 29, 2026
Merged

fix(resume): PDFのプロジェクト見出しがページ跨ぎで繰り返すのを解消#434
yusuke0610 merged 1 commit into
mainfrom
feat/resume-pdf-no-repeat-project-header

Conversation

@yusuke0610

@yusuke0610 yusuke0610 commented Jun 29, 2026

Copy link
Copy Markdown
Owner

概要

経歴書PDFでプロジェクトの詳細がページを跨ぐとき、プロジェクト見出し(期間/役割/体制/工程・スキルセット)が各ページの先頭で繰り返し表示されていた。これを「見出しは1回のみ表示し、長い詳細はページ境界で見切れる」挙動に変更する。

原因

_build_project_html で見出しを <thead> に置いていたため、WeasyPrint が表のページ跨ぎ時に thead を各ページ先頭で自動的に繰り返していた。

変更内容

  • backend/app/services/pdf/generators/resume_generator.py: 見出し行を <thead> から <tbody> の先頭行へ移動。
  • backend/app/services/pdf/templates/resume.css: 古いコメント(「分割時は thead で繰り返す」)を実挙動に合わせて修正。
  • backend/tests/test_pdf_generator.py: 回帰テストとして <thead> が出力に含まれないことを assert 追加。

挙動変更

ページを跨ぐ長いプロジェクトで、2ページ目以降の先頭に出ていた見出しが出なくなり、詳細がページ境界で見切れる(ご依頼どおりの仕様)。

テスト

  • make ci 全パス(backend 631 / web 365+4、build OK)。
  • codegen/E2E トリガーには非該当(OpenAPI スキーマ・ルート・UIフロー変更なし)。

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • Adjusted project table headings in resume PDFs so the left-side title row is rendered within the table body, improving how headings appear in generated resumes.
    • Updated pagination behavior expectations for project headings to match the new layout.
  • Tests

    • Updated PDF generation checks to verify the revised table structure and ensure no table header section is produced.

経歴書PDFでプロジェクトの詳細がページを跨ぐと、WeasyPrintが
thead を各ページ先頭で繰り返し、見出し(期間/役割/体制/工程・
スキルセット)が毎ページ表示されていた。見出し行を thead から
tbody の先頭行へ移し、見出しは1回のみ表示・詳細はページ境界で
見切れる挙動にする。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 02bc7e7b-8f11-49d8-9969-19c2f5c2fafe

📥 Commits

Reviewing files that changed from the base of the PR and between 09c6230 and 523bc89.

📒 Files selected for processing (3)
  • backend/app/services/pdf/generators/resume_generator.py
  • backend/app/services/pdf/templates/resume.css
  • backend/tests/test_pdf_generator.py

📝 Walkthrough

Walkthrough

The project table header row in _build_project_html() is moved from a <thead> element into the first row of <tbody>, preventing WeasyPrint from repeating it across page breaks. The CSS comment and a test assertion are updated to match.

Changes

Project table thead → tbody migration

Layer / File(s) Summary
tbody header row generation, test, and CSS comment
backend/app/services/pdf/generators/resume_generator.py, backend/tests/test_pdf_generator.py, backend/app/services/pdf/templates/resume.css
Header row HTML moves from <thead> into the first <tbody> row; test adds assertion that <thead> is absent; CSS comment updated to state headings are in tbody and do not repeat across page breaks.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • yusuke0610/devforge#302: Directly modifies the same project table and header layout in resume_generator.py and resume.css.

Poem

🐇 No more <thead> to repeat at every break,
The header hops into <tbody> for good,
Page splits stay tidy, no clipping mistake,
A table well-nested, just as it should.
Hippity-hop, the markup's set straight! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PDFのプロジェクト見出しがページ跨ぎで繰り返す問題を解消する内容で、変更点を的確に表しています。
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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 feat/resume-pdf-no-repeat-project-header

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.

❤️ Share

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

@github-actions github-actions Bot added bug バグ修正 backend バックエンド test テスト追加・修正 labels Jun 29, 2026
@yusuke0610
yusuke0610 merged commit 139ad76 into main Jun 29, 2026
23 checks passed
@yusuke0610
yusuke0610 deleted the feat/resume-pdf-no-repeat-project-header branch July 20, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend バックエンド bug バグ修正 test テスト追加・修正

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant