Skip to content

Conversation

@cabaucom376
Copy link
Contributor

@cabaucom376 cabaucom376 commented Jan 4, 2026

closes #1163

Disclaimer Greptiles Reviews use AI, make sure to check over its work

Greptile Summary

This PR adds a status filter to the projects table, allowing users to filter projects by their status (running, stopped, or partially running). The implementation adds a projectStatus query parameter in the backend handler, implements SQL filtering with parameterized queries in the service layer, and integrates a faceted filter UI component in the frontend table toolbar. The filter values correctly match the backend status constants, and the implementation properly handles empty/missing filter values.

Confidence Score: 5/5

  • This PR is safe to merge with no critical issues found
  • The implementation is clean, follows existing patterns in the codebase, uses parameterized SQL queries to prevent injection, and properly handles edge cases like empty filters. All status values match between frontend and backend constants.
  • No files require special attention

Important Files Changed

Filename Overview
backend/internal/huma/handlers/projects.go added projectStatus query parameter and passes it to service layer via filters map
backend/internal/services/project_service.go implemented status filtering using parameterized SQL IN clause, properly splits comma-separated values
frontend/src/lib/components/arcane-table/data.ts defined projectStatusFilters with correct status values matching backend constants
frontend/src/routes/(app)/projects/projects-table.svelte added id: 'projectStatus' to status column definition to enable filtering

@cabaucom376 cabaucom376 requested a review from a team January 4, 2026 00:18
@github-actions
Copy link

github-actions bot commented Jan 4, 2026

🔍 Deadcode Analysis

Found 6 unreachable functions in the backend.

View details
internal/common/errors.go:681:34: unreachable func: ProjectDeploymentError.Error
internal/huma/middleware/auth.go:242:6: unreachable func: RequireAdmin
internal/utils/http/request.go:66:6: unreachable func: GetQueryParam
internal/utils/http/request.go:79:6: unreachable func: GetIntQueryParam
internal/utils/pagination/params.go:15:6: unreachable func: ExtractListModifiersQueryParams
internal/utils/pathmapper/path_mapper.go:120:23: unreachable func: PathMapper.IsNonMatchingMount

Only remove deadcode that you know is 100% no longer used.

Analysis from commit 92fd141

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

13 files reviewed, 4 comments

Edit Code Review Agent Settings | Greptile

@cabaucom376 cabaucom376 force-pushed the feat/inactive-project-sorting branch from ce50317 to 42dbcf9 Compare January 4, 2026 00:25
@cabaucom376
Copy link
Contributor Author

I'm not sure I like this current solution. The desired behavior is to just get rid of stopped projects from the view, so a filter like usage on the images table would be better.

@cabaucom376 cabaucom376 changed the title feat: customize sort order for stopped projects in table feat: add status filter to projects table Jan 5, 2026
@cabaucom376
Copy link
Contributor Author

@greptileai

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 5, 2026

Greptile's behavior is changing!

From now on, if a review finishes with no comments, we will not post an additional "statistics" comment to confirm that our review found nothing to comment on. However, you can confirm that we reviewed your changes in the status check section.

This feature can be toggled off in your Code Review Settings by deselecting "Create a status check for each PR".

@kmendell
Copy link
Member

kmendell commented Jan 5, 2026

I couldnt get this to work, which then got me thinking the existsing status field should be able to work for this id think

@cabaucom376
Copy link
Contributor Author

cabaucom376 commented Jan 5, 2026

It is working for me but I'n all honesty I am now noticing it is janky starting it back up. If you stop a project externally it still shows the project under the running filter even though the status is correctly showing Stopped. I'll take another look.

On a side note, not related to this issue, but selecting multiple filters does not properly work, it seems to behave as a first selected basis. Try selecting both option under images usage filter for an example

@cabaucom376
Copy link
Contributor Author

Check that out is that what you meant?

@getarcaneappbot
Copy link
Contributor

getarcaneappbot commented Jan 7, 2026

Docker images for this PR have been built successfully!

  • Manager: ghcr.io/getarcaneapp/arcane:pr-1328
  • Agent: ghcr.io/getarcaneapp/arcane-headless:pr-1328

Built from commit 60248ab

@kmendell
Copy link
Member

kmendell commented Jan 8, 2026

@cabaucom376 See the filter fix i made in #1391, this is cleaner to me , and should fix every page as well.

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

This pull request has merge conflicts. Please resolve the conflicts so the PR can stay up-to-date and reviewed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

⚡️ Feature: Keep Stopped Projects at the bottom 🐞 Bug: Eventlog severity filter does not work

4 participants