({
url: `/api/rooms/${roomId}/messages/search`,
params: { q: searchQuery, limit: 20, offset: searchOffset },
});
- const data = resp.data?.data as SearchResult | undefined;
+ const data = resp.data;
if (data) {
setResults(data);
setOffset(searchOffset);
diff --git a/src/components/room/RoomPinPanel.tsx b/src/components/room/RoomPinPanel.tsx
index 0aa88cd..5fe20d1 100644
--- a/src/components/room/RoomPinPanel.tsx
+++ b/src/components/room/RoomPinPanel.tsx
@@ -58,7 +58,7 @@ interface RoomPinPanelProps {
messages: Array<{
id: string;
content: string;
- sender_id: string;
+ sender_id?: string | null;
sender_type: string;
send_at: string;
}>;
diff --git a/src/components/ui/message-list.tsx b/src/components/ui/message-list.tsx
index 7f07542..933c758 100644
--- a/src/components/ui/message-list.tsx
+++ b/src/components/ui/message-list.tsx
@@ -24,7 +24,7 @@ export function MessageList({
}: MessageListProps) {
return (
- {messages.map((message, index) => {
+ {messages.map((message) => {
const additionalOptions =
typeof messageOptions === "function"
? messageOptions(message)
diff --git a/src/contexts/repository-context.tsx b/src/contexts/repository-context.tsx
index bcd74d2..1898f71 100644
--- a/src/contexts/repository-context.tsx
+++ b/src/contexts/repository-context.tsx
@@ -111,9 +111,10 @@ export const RepositoryContextProvider = ({
// Return a minimal placeholder during loading to avoid unmounting
// the entire subtree (which causes state loss and flash).
const fallbackRepo: RepoInfo = {
- id: '', name: '', namespace: '', display_name: '',
- description: '', is_private: false, default_branch: '',
- fork_count: 0, star_count: 0, watch_count: 0,
+ namespace: '', repo_name: '', uid: '',
+ description: null, is_private: false, default_branch: '',
+ commit_count: 0, branch_count: 0, tag_count: 0,
+ star_count: 0, watch_count: 0,
last_commit_at: new Date().toISOString(),
is_star: false, is_watch: false,
ssh_clone_url: '', https_clone_url: '', ai_code_review_enabled: false,
diff --git a/src/hooks/use-audio-recording.ts b/src/hooks/use-audio-recording.ts
index d5458c5..f9ad7a8 100644
--- a/src/hooks/use-audio-recording.ts
+++ b/src/hooks/use-audio-recording.ts
@@ -77,8 +77,8 @@ export function useAudioRecording({
console.error("Error recording audio:", error)
setIsListening(false)
setIsRecording(false)
- if (stream) {
- stream.getTracks().forEach((track) => track.stop())
+ if (audioStream) {
+ audioStream.getTracks().forEach((track: MediaStreamTrack) => track.stop())
}
setAudioStream(null)
}
diff --git a/src/lib/universal-ws.ts b/src/lib/universal-ws.ts
index 6ad86c8..e12156c 100644
--- a/src/lib/universal-ws.ts
+++ b/src/lib/universal-ws.ts
@@ -89,7 +89,7 @@ export class UniversalWsClient {
// Reject all pending requests
const pending = [...this.pendingRequests.entries()];
this.pendingRequests.clear();
- for (const [id, req] of pending) {
+ for (const [_id, req] of pending) {
clearTimeout(req.timeout);
req.reject(new Error(`WebSocket closed: ${ev.reason || 'unknown'}`));
}