Skip to content

Commit 8e336df

Browse files
committed
fix: remove .serena from repo and fix prettier formatting
Add .serena/ to .gitignore - tool config should not be committed. Run prettier on all files that failed CI formatting check.
1 parent 99d9ee3 commit 8e336df

13 files changed

Lines changed: 77 additions & 239 deletions

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@ dist-ssr
2222
*.njsproj
2323
*.sln
2424
*.sw?
25+
26+
# Serena
27+
.serena/

.serena/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

.serena/project.yml

Lines changed: 0 additions & 152 deletions
This file was deleted.

src/components/EntityResourceTabs.tsx

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,14 @@ export function EntityResourceTabs({ entityId, entityType, basePath, onNavigate
6060
const [operations, setOperations] = useState<Operation[]>([]);
6161
const [faults, setFaults] = useState<Fault[]>([]);
6262

63-
const { selectEntity, fetchEntityData, fetchEntityOperations, fetchConfigurations, listEntityFaults, storeConfigurations } = useAppStore(
63+
const {
64+
selectEntity,
65+
fetchEntityData,
66+
fetchEntityOperations,
67+
fetchConfigurations,
68+
listEntityFaults,
69+
storeConfigurations,
70+
} = useAppStore(
6471
useShallow((state) => ({
6572
selectEntity: state.selectEntity,
6673
fetchEntityData: state.fetchEntityData,
@@ -80,16 +87,12 @@ export function EntityResourceTabs({ entityId, entityType, basePath, onNavigate
8087
try {
8188
switch (tab) {
8289
case 'data': {
83-
const dataRes = await fetchEntityData(entityType, entityId).catch(
84-
() => [] as ComponentTopic[]
85-
);
90+
const dataRes = await fetchEntityData(entityType, entityId).catch(() => [] as ComponentTopic[]);
8691
setData(dataRes);
8792
break;
8893
}
8994
case 'operations': {
90-
const opsRes = await fetchEntityOperations(entityType, entityId).catch(
91-
() => [] as Operation[]
92-
);
95+
const opsRes = await fetchEntityOperations(entityType, entityId).catch(() => [] as Operation[]);
9396
setOperations(opsRes);
9497
break;
9598
}
@@ -114,7 +117,15 @@ export function EntityResourceTabs({ entityId, entityType, basePath, onNavigate
114117
setIsLoading(false);
115118
}
116119
},
117-
[fetchEntityData, fetchEntityOperations, fetchConfigurations, listEntityFaults, entityId, entityType, loadedTabs]
120+
[
121+
fetchEntityData,
122+
fetchEntityOperations,
123+
fetchConfigurations,
124+
listEntityFaults,
125+
entityId,
126+
entityType,
127+
loadedTabs,
128+
]
118129
);
119130

120131
// Load resources when tab changes

src/components/FaultsDashboard.tsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,15 @@ export function FaultsDashboard() {
409409
const [groupByEntity, setGroupByEntity] = useState(true);
410410

411411
// Use shared faults state from store
412-
const { faults, isLoadingFaults, isConnected, fetchFaults, clearFault, getFaultWithEnvironmentData, hasFaultStream } = useAppStore(
412+
const {
413+
faults,
414+
isLoadingFaults,
415+
isConnected,
416+
fetchFaults,
417+
clearFault,
418+
getFaultWithEnvironmentData,
419+
hasFaultStream,
420+
} = useAppStore(
413421
useShallow((state) => ({
414422
faults: state.faults,
415423
isLoadingFaults: state.isLoadingFaults,
@@ -490,11 +498,7 @@ export function FaultsDashboard() {
490498
setLoadingDetails((prev) => new Set([...prev, faultCode]));
491499
try {
492500
const entityGroup = mapFaultEntityTypeToResourceType(fault.entity_type);
493-
const details = await getFaultWithEnvironmentData(
494-
entityGroup,
495-
fault.entity_id,
496-
faultCode
497-
);
501+
const details = await getFaultWithEnvironmentData(entityGroup, fault.entity_id, faultCode);
498502
setFaultDetails((prev) => new Map(prev).set(faultCode, details as FaultResponse));
499503
} catch (err) {
500504
console.error('Failed to fetch fault details:', err);

src/components/FaultsPanel.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -321,11 +321,7 @@ export function FaultsPanel({ entityId, entityType = 'components' }: FaultsPanel
321321
? mapFaultEntityTypeToResourceType(fault.entity_type)
322322
: entityType;
323323
const detailEntityId = fault?.entity_id || entityId;
324-
const details = await getFaultWithEnvironmentData(
325-
detailEntityType,
326-
detailEntityId,
327-
faultCode
328-
);
324+
const details = await getFaultWithEnvironmentData(detailEntityType, detailEntityId, faultCode);
329325
setFaultDetails((prev) => new Map(prev).set(faultCode, details as FaultResponse));
330326
} catch (err) {
331327
console.error('Failed to fetch fault details:', err);

src/components/FunctionsPanel.tsx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,15 @@ export function FunctionsPanel({ functionId, functionName, description, path, on
6868
const [faults, setFaults] = useState<Fault[]>([]);
6969
const [isLoading, setIsLoading] = useState(false);
7070

71-
const { selectEntity, getFunctionHosts, fetchEntityData, fetchEntityOperations, fetchConfigurations, listEntityFaults, storeConfigurations } = useAppStore(
71+
const {
72+
selectEntity,
73+
getFunctionHosts,
74+
fetchEntityData,
75+
fetchEntityOperations,
76+
fetchConfigurations,
77+
listEntityFaults,
78+
storeConfigurations,
79+
} = useAppStore(
7280
useShallow((state) => ({
7381
selectEntity: state.selectEntity,
7482
getFunctionHosts: state.getFunctionHosts,
@@ -158,7 +166,7 @@ export function FunctionsPanel({ functionId, functionName, description, path, on
158166
if (tab.id === 'hosts') count = hosts.length;
159167
if (tab.id === 'data') count = topics.length;
160168
if (tab.id === 'operations') count = operations.length;
161-
if (tab.id === 'configurations') count = (storeConfigurations.get(functionId)?.length || 0);
169+
if (tab.id === 'configurations') count = storeConfigurations.get(functionId)?.length || 0;
162170
if (tab.id === 'faults') count = faults.length;
163171

164172
return (
@@ -236,7 +244,9 @@ export function FunctionsPanel({ functionId, functionName, description, path, on
236244
className="p-3 rounded-lg border hover:bg-accent/50 transition-colors text-left"
237245
>
238246
<Settings className="w-4 h-4 text-violet-500 mb-1" />
239-
<div className="text-2xl font-semibold">{(storeConfigurations.get(functionId)?.length || 0)}</div>
247+
<div className="text-2xl font-semibold">
248+
{storeConfigurations.get(functionId)?.length || 0}
249+
</div>
240250
<div className="text-xs text-muted-foreground">Configs</div>
241251
</button>
242252
<button

src/components/RosbagDownloadButton.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,7 @@ export function RosbagDownloadButton({ snapshot, variant = 'outline', size = 'sm
5757
throw new Error('Invalid bulk_data_uri format');
5858
}
5959

60-
const result = await downloadBulkData(
61-
parsed.entityType,
62-
parsed.entityId,
63-
parsed.category,
64-
parsed.id
65-
);
60+
const result = await downloadBulkData(parsed.entityType, parsed.entityId, parsed.category, parsed.id);
6661

6762
if (!result) {
6863
throw new Error('Download failed');

0 commit comments

Comments
 (0)