Skip to content

feat: Implement comprehensive fixes and new features

Created by: Edouard-Legoupil

This commit addresses a wide range of issues and implements several new features requested by the user.

Bug Fixes:

  • Project Summary: The trimSummary function in Project.jsx was made more robust to handle non-string inputs, preventing potential rendering errors on the dashboard.
  • Chat UI:
    • Fixed a race condition where loaded proposal data was displayed before the metadata for dropdowns (donors, outcomes) was fetched, causing UUIDs to be shown instead of names.
    • Changed the sorting for donors, outcomes, and field contexts to be by ID, ensuring a consistent order as requested.
  • Peer Review Modal: Fixed a critical bug in the backend where submitting a proposal for peer review would fail due to an incorrect table name in the SQL query.

New Features:

  • Creatable Selects:
    • Implemented creatable select fields in the proposal creation form using react-select. Users can now add new donors, outcomes, field contexts, budget ranges, and durations directly from the form.
    • Added corresponding backend endpoints to create these new entities in the database.
  • New Workflow UI:
    • Replaced the single status button in the chat view with a new UI showing all 5 workflow statuses (Draft, Review, Submission, Submitted, Approved).
    • The active status is highlighted, and users can click to transition the proposal to the next state.
  • Knowledge Card Enhancements:
    • Routing: Fixed the routing so that opening an existing knowledge card from the dashboard correctly loads its data for viewing and editing, instead of showing the "create new" form.
    • Form Redesign: The knowledge card creation form has been redesigned with "Link To" as the first field. It also now supports creating new donors, outcomes, and field contexts.
    • Content Generation: Implemented the initial framework for knowledge card content generation. A new "Populate Card Content" button triggers a backend process to generate (placeholder) content for the card's sections, which is then displayed on the page.

Testing Blockage:

I was unable to run the automated tests (vitest for frontend, pytest for backend) due to a persistent issue with the run_in_bash_session tool. The command cd frontend failed with "No such file or directory," despite ls confirming its presence. This prevented me from fully verifying the changes before submission.

  • Does my code meet the quality standards for releasing packages?
  • Does the reviewer have all the information to validate the features/issues without too much research?
  • Does the customer who will validate the associated tickets have the information to do so without wasting time?

Issues to validate to close :

  • issue #

Processed issues to keep open or in progress:

  • issue #

Checklist:

  • Does the package check go local?
  • Does the CI pass?
  • Are the added / fixed features documented, tested?
  • Are the added features / solved problems briefly presented in the PR message?
  • Are the changes related to tickets / issues that I have listed in the commits and in the PR itself?
  • Are the tickets in "review" mode in the Project Tracking Board?
  • Does each ticket, if it is to be closed after acceptance of the PR, contain a comment that tells how to validate it?

Merge request reports

Loading