Skip to content

feat(frontend-filter): optimize location filter with search caching, debounce, and RxJS refactor#284

Merged
siervo-jallaine merged 9 commits intodevelopfrom
filter
Jan 9, 2026
Merged

feat(frontend-filter): optimize location filter with search caching, debounce, and RxJS refactor#284
siervo-jallaine merged 9 commits intodevelopfrom
filter

Conversation

@siervo-jallaine
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

⚠️ AI Code Analysis: I found some potential issues for you to review.


return ResponseEntity.ok(paginatedResponse);
}
private final CopyOnWriteArrayList<SseEmitter> emitters = new CopyOnWriteArrayList<>();
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📏 Style Violation: Line exceeds 80 characters
(Current: 89). Please break this line.

User authenticatedUser = (User) authentication.getPrincipal();
int userId = authenticatedUser.getUserId();

Map<String, Object> paginatedResponse = service.listByUserId(userId, page, size, status);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📏 Style Violation: Line exceeds 80 characters
(Current: 93). Please break this line.

List<Notification> findByUserId(@Param("userId") int userId,
Pageable pageable);

@Query("SELECT n FROM Notification n WHERE n.user_id = :userId AND n.status = :status " +
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📏 Style Violation: Line exceeds 80 characters
(Current: 91). Please break this line.

@Query("SELECT COUNT(n) FROM Notification n WHERE n.user_id = :userId")
int countByUserId(@Param("userId") int userId);

@Query("SELECT COUNT(n) FROM Notification n WHERE n.user_id = :userId AND n.status = :status")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📏 Style Violation: Line exceeds 80 characters
(Current: 96). Please break this line.

int countByUserId(@Param("userId") int userId);

@Query("SELECT COUNT(n) FROM Notification n WHERE n.user_id = :userId AND n.status = :status")
int countByUserIdAndStatus(@Param("userId") int userId, @Param("status") String status);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📏 Style Violation: Line exceeds 80 characters
(Current: 90). Please break this line.

List<Notification> notifications;
int totalItems;

if (status != null && !status.isEmpty() && !status.equalsIgnoreCase("all")) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📏 Style Violation: Line exceeds 80 characters
(Current: 81). Please break this line.

return locations
.filter(option => option.toLowerCase().includes(filterValue))
.slice(0, 5);
switchMap(([value, locations]: [string | null, string[]]): Observable<string[]> => {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📏 Style Violation: Line exceeds 80 characters
(Current: 92). Please break this line.

import { adminGuard } from './core/auth/admin-guard';

import { HeaderNFooterOnly
import { HeaderNFooterOnly
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🤖 AI Review: This line appears to be incomplete. Please ensure all import statements are fully written.

import { HeaderNFooterOnly

return this.http.put(`${this.API_BASE_URL}/notifications/${id}/read`, {});
}

markAllAsRead(): Observable<any> {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🤖 AI Review: Strict Typing: Avoid using the 'any' type. Please specify a more precise return type for this Observable.

markAllAsRead(): Observable<any> {

class="filter-link">All</span>
&bull;
<span (click)="setFilter('unread')"
[class.active]="currentFilter === 'unread'"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🤖 AI Review: This line appears to be incomplete or syntactically incorrect. Please ensure the Angular binding expression is complete and valid.

[class.active]="currentFilter === 'unread' 

@siervo-jallaine siervo-jallaine merged commit 8d8222f into develop Jan 9, 2026
1 check passed
@siervo-jallaine siervo-jallaine deleted the filter branch January 10, 2026 00:29
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