Skip to content

Hotfix projects home when pin_order is unavailable#492

Merged
dtrn2048 merged 2 commits intotestingfrom
hotfix/pin_order
Mar 19, 2026
Merged

Hotfix projects home when pin_order is unavailable#492
dtrn2048 merged 2 commits intotestingfrom
hotfix/pin_order

Conversation

@dtrn2048
Copy link
Contributor

Summary

  • make /api/projects/home fall back to a query without pin_order when testing Directus rejects that field
  • keep the projects list visible even if pinned projects cannot be loaded
  • add a regression test for the fallback path

Root cause

Testing started returning empty project lists because the new projects-home BFF queried project.pin_order, but testing Directus rejected that field. The endpoint swallowed the failed list query and returned empty arrays while a separate count query still returned the correct total.

Verification

  • uv run ruff check dembrane/api/project.py tests/api/test_projects_home.py
  • uv run ruff format --check dembrane/api/project.py tests/api/test_projects_home.py
  • uv run pytest tests/api/test_projects_home.py tests/api/test_chat_agentic_mode.py -q

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 19, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 6fb354c8-be16-43f3-8955-33e205e22cd7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch hotfix/pin_order
📝 Coding Plan
  • Generate coding plan for human review comments

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.

@dtrn2048 dtrn2048 merged commit 9539dac into testing Mar 19, 2026
6 checks passed
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