Skip to content

ECHO-526 make report updatable even when not published#357

Merged
ussaama merged 2 commits intomainfrom
make-report-updatable-unplublished
Nov 19, 2025
Merged

ECHO-526 make report updatable even when not published#357
ussaama merged 2 commits intomainfrom
make-report-updatable-unplublished

Conversation

@ussaama
Copy link
Copy Markdown
Contributor

@ussaama ussaama commented Nov 12, 2025

Note

Enables updating project reports even when not published by showing the update button always and removing the published-only filter in the update-check hook.

  • Report UI:
    • Show UpdateReportModalButton unconditionally in routes/project/report/ProjectReportRoute.tsx (share/print remain gated by published).
  • Hooks/Data:
    • useDoesProjectReportNeedUpdate in components/report/hooks/index.ts no longer filters reports by status = "published".

Written by Cursor Bugbot for commit 2cf40cf. This will update automatically on new commits. Configure here.

Summary by CodeRabbit

  • New Features

    • Report update capability is now accessible for reports in all statuses, no longer limited to published reports, providing greater flexibility for managing your reports.
  • Bug Fixes

    • The Update Report button is now consistently available and prominently displayed in the report header for improved visibility and accessibility.

@linear
Copy link
Copy Markdown

linear bot commented Nov 12, 2025

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Nov 12, 2025

Walkthrough

Removed the "published" status requirement from report updates. The query filter no longer restricts by publication status, and the update button is unconditionally rendered, enabling users to update reports in any state.

Changes

Cohort / File(s) Change Summary
Enable non-published report updates
echo/frontend/src/components/report/hooks/index.ts, echo/frontend/src/routes/project/report/ProjectReportRoute.tsx
Removed the status === "published" filter from the update-check query and relocated UpdateReportModalButton to render unconditionally in the header's rightSection instead of conditionally within the published-status block.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Both changes are focused and homogeneous (removing the published status gate)
  • Hook modification removes a single filter constraint
  • Component change is a straightforward relocation for unconditional rendering

Suggested labels

Feature

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: making the report update function available for unpublished reports.
Linked Issues check ✅ Passed The code changes directly address ECHO-526 by removing the published status constraint and unconditionally rendering the update button.
Out of Scope Changes check ✅ Passed All changes are focused on removing the published status requirement and making the update modal always available, directly aligned with the linked issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch make-report-updatable-unplublished

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 0f99d28 and 2cf40cf.

📒 Files selected for processing (2)
  • echo/frontend/src/components/report/hooks/index.ts (0 hunks)
  • echo/frontend/src/routes/project/report/ProjectReportRoute.tsx (1 hunks)
💤 Files with no reviewable changes (1)
  • echo/frontend/src/components/report/hooks/index.ts
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: ussaama
Repo: Dembrane/echo PR: 205
File: echo/frontend/src/lib/query.ts:1444-1506
Timestamp: 2025-07-10T12:48:20.683Z
Learning: ussaama prefers string concatenation over template literals for simple cases where readability is clearer, even when linting tools suggest template literals. Human readability takes precedence over strict linting rules in straightforward concatenation scenarios.
📚 Learning: 2025-08-08T10:39:31.114Z
Learnt from: ussaama
Repo: Dembrane/echo PR: 259
File: echo/frontend/src/components/layout/ParticipantLayout.tsx:33-33
Timestamp: 2025-08-08T10:39:31.114Z
Learning: In echo/frontend/src/components/layout/ParticipantLayout.tsx, prefer using simple pathname.includes("start") and pathname.includes("finish") to control the settings button visibility. No need to switch to segment-based matching or add a useEffect to auto-close the modal for these routes, per ussaama’s preference in PR #259.

Applied to files:

  • echo/frontend/src/routes/project/report/ProjectReportRoute.tsx
📚 Learning: 2025-05-30T15:38:44.413Z
Learnt from: ussaama
Repo: Dembrane/echo PR: 169
File: echo/frontend/src/components/project/ProjectPortalEditor.tsx:409-464
Timestamp: 2025-05-30T15:38:44.413Z
Learning: Badge-based selectors in ProjectPortalEditor.tsx: Keyboard navigation enhancements for accessibility are considered optional improvements rather than critical issues. The user acknowledges these suggestions but doesn't prioritize them as blockers.

Applied to files:

  • echo/frontend/src/routes/project/report/ProjectReportRoute.tsx
🧬 Code graph analysis (1)
echo/frontend/src/routes/project/report/ProjectReportRoute.tsx (1)
echo/frontend/src/components/report/UpdateReportModalButton.tsx (1)
  • UpdateReportModalButton (25-122)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: ci-check-server
🔇 Additional comments (1)
echo/frontend/src/routes/project/report/ProjectReportRoute.tsx (1)

170-170: LGTM! Clean refactor, ship it.

Moving the UpdateReportModalButton out of the published-status gate is the right call. The component's got its own internal guards via useDoesProjectReportNeedUpdate, so it'll still render null when it should. Share/print controls stay correctly locked to published reports. Architecture's solid, zero breaking changes.


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 and usage tips.

@cursor
Copy link
Copy Markdown

cursor bot commented Nov 18, 2025

You have run out of free Bugbot PR reviews for this billing cycle. This will reset on December 5.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@ussaama ussaama added this pull request to the merge queue Nov 19, 2025
Merged via the queue into main with commit 956df04 Nov 19, 2025
10 checks passed
@ussaama ussaama deleted the make-report-updatable-unplublished branch November 19, 2025 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants