Skip to content

✨ Expandable milestone rows & fix comment appending - #845

Open
AlejandroMinaya wants to merge 2 commits into
mainfrom
osidb-5497
Open

✨ Expandable milestone rows & fix comment appending#845
AlejandroMinaya wants to merge 2 commits into
mainfrom
osidb-5497

Conversation

@AlejandroMinaya

Copy link
Copy Markdown
Collaborator

Summary

Two changes for OSIDB-5497:

✨ Expandable milestone rows (SRPReportDetails)

manual_completion_notes was saved to the backend but never rendered. Adds a per-milestone expand/collapse row (chevron toggle) that reveals:

  • Request Source
  • Request Received date
  • Request Text
  • Notes (manual_completion_notes)

Keyboard accessible via Enter/Space. Falls back to "No additional details." when all fields are empty.

🐛 Fix comment not appended after postFlawComment

After posting a public/private comment, the resolved comment object was passed directly to afterSaveSuccess() as its queue argument. afterSaveSuccess() expected an array of callbacks and called .map() on it, causing a silent TypeError. More critically, flaw.value.comments was never updated, so the new comment was invisible until a full page reload.

Fix: use the comment object returned by postFlawComment to append it to flaw.value.comments, then call afterSaveSuccess() with no arguments matching its () => void signature.

Tests

  • Milestone rows: hidden by default, expand on click showing content, collapse on second click.
  • Comment: should append the saved comment to flaw.value.comments

After a public/private comment was posted, the resolved comment object
was passed directly to afterSaveSuccess() as its queue argument.
afterSaveSuccess() expected an array of callbacks and called .map() on
it, causing a silent TypeError. More critically, flaw.value.comments was
never updated, so the new comment was invisible until a full page reload.

Fix: use the comment object already returned by postFlawComment to
append it to flaw.value.comments, then call afterSaveSuccess() with no
arguments matching its () => void signature.

Test: 'should append the saved comment to flaw.value.comments'
manual_completion_notes was saved to the backend but never rendered.
Add per-milestone expand/collapse rows (chevron toggle) that reveal:
  - Request Source
  - Request Received date
  - Request Text
  - Notes (manual_completion_notes)

Clicking anywhere on the milestone row toggles the detail panel.
Action buttons use @click.stop to avoid triggering the toggle.
Keyboard accessible via Enter/Space.

Tests: hidden by default, expands with content on click, collapses on second click.
@AlejandroMinaya
AlejandroMinaya requested a review from a team September 4, 2026 11:42
@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 5c743eed-6d33-4aa6-b24e-867f25c1d083

📥 Commits

Reviewing files that changed from the base of the PR and between ff2646a and 269f622.

📒 Files selected for processing (4)
  • src/components/CRA/SRPReportDetails.vue
  • src/components/CRA/__tests__/SRPReportDetails.spec.ts
  • src/composables/__tests__/useFlawCommentsModel.spec.ts
  • src/composables/useFlawCommentsModel.ts

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.


📝 Summary

Summary by CodeRabbit

  • New Features

    • Milestone rows can now be expanded to show request metadata and completion notes.
    • Added clear expand/collapse indicators and preserved formatting in displayed notes.
    • Quick actions support keyboard activation for submit, defer, and block operations.
  • Bug Fixes

    • Newly saved OSIDB comments now appear immediately in the flaw’s comment list without requiring a refresh.

Walkthrough

The change adds expandable SRP milestone detail rows with keyboard-accessible actions and stronger typing. It also appends successfully saved OSIDB comments to the local flaw comment collection and adds test coverage for both behaviors.

Changes

SRP milestone details

Layer / File(s) Summary
Milestone detail flow
src/components/CRA/SRPReportDetails.vue
Milestone rows now track expansion state and display request metadata, completion notes, fallback text, and accessible controls.
Milestone detail validation
src/components/CRA/__tests__/SRPReportDetails.spec.ts
Tests cover collapsed and expanded details, recollapse behavior, and keyboard activation of submit, defer, and block actions.

OSIDB comment state

Layer / File(s) Summary
Append saved OSIDB comments
src/composables/useFlawCommentsModel.ts, src/composables/__tests__/useFlawCommentsModel.spec.ts
Saved OSIDB comments are appended to the flaw’s local comments before the success callback. Tests verify the comment text and privacy state.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 269f6

Milestone rows can now reveal request and completion details, while newly saved comments appear immediately in local state. No merge-blocking risk is currently identified.

Suggested reviewers: c-valen

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 3 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies both primary changes: expandable milestone rows and the comment-appending fix. It is concise and related to the changeset.
Description check ✅ Passed The description explains both changes, their behavior, the defect cause, the fix, and the added tests. It does not use every template heading or checklist item, but it provides the required implementa…
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 3 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch osidb-5497

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

@AlejandroMinaya

Copy link
Copy Markdown
Collaborator Author

@coderabbitai resolve

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Comments resolved. Approval is disabled; enable reviews.request_changes_workflow to allow explicit top-level @coderabbitai resolve or @coderabbitai approve commands.

@C-Valen C-Valen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good work, as we talked off thread the expandable rows it's overlapped from the work on #836

I took the comment appending fix and added to that PR

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.

2 participants