Skip to content

Commit 11eadda

Browse files
rlyclaude
andcommitted
Show Plexon2 as "Windows only" instead of hiding it on non-Windows
Instead of excluding Plexon2RecordingInterface from the backend on non-Windows, let it appear in the search list as disabled with a "Windows only" label. This informs users about the platform requirement rather than silently hiding the option. - Remove backend sys.platform check in get_all_interface_info() - Export windowsOnlyInterfaces from globals - Pass disabledReason to Search options for per-item disabled labels - Support per-item --disabled-label override in Search component Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e623b5e commit 11eadda

4 files changed

Lines changed: 14 additions & 9 deletions

File tree

src/electron/frontend/core/components/Search.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,11 @@ export class Search extends LitElement {
397397
this.#onSelect(option);
398398
});
399399

400-
if (disabled) listItemElement.setAttribute("disabled", "");
400+
if (disabled) {
401+
listItemElement.setAttribute("disabled", "");
402+
if (option.disabledReason)
403+
listItemElement.style.setProperty("--disabled-label", `"${option.disabledReason}"`);
404+
}
401405

402406
const container = document.createElement("div");
403407

src/electron/frontend/core/components/pages/guided-mode/data/GuidedStructure.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Page } from "../../Page.js";
33

44
// For Multi-Select Form
55
import { Button } from "../../../Button.js";
6-
import { supportedInterfaces } from "../../../../globals";
6+
import { supportedInterfaces, windowsOnlyInterfaces } from "../../../../globals";
77
import { Search } from "../../../Search.js";
88
import { Modal } from "../../../Modal";
99
import { List } from "../../../List";
@@ -129,13 +129,19 @@ export class GuidedStructurePage extends Page {
129129
suffixes: value.suffixes ?? [],
130130
};
131131

132+
const isSupported = supportedInterfaces.includes(interfaceName);
133+
const disabledReason = !isSupported && windowsOnlyInterfaces.includes(interfaceName)
134+
? "Windows only"
135+
: undefined;
136+
132137
return {
133138
...value, // Contains label and name already (extra metadata)
134139
key: displayName,
135140
value: interfaceName,
136141
structuredKeywords,
137142
category,
138-
disabled: !supportedInterfaces.includes(interfaceName),
143+
disabled: !isSupported,
144+
disabledReason,
139145
};
140146
});
141147

src/electron/frontend/core/globals.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ export const ENCRYPTION_IV = isElectron ? crypto.randomBytes(IV_LENGTH) : "";
4949
// Storybook
5050
export const isStorybook = window.location.href.includes("iframe.html");
5151

52-
export { supportedInterfaces };
52+
export { supportedInterfaces, windowsOnlyInterfaces };

src/pyflask/manageNeuroconv/manage_neuroconv.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import math
88
import os
99
import re
10-
import sys
1110
import traceback
1211
import zoneinfo
1312
from datetime import datetime, timedelta
@@ -370,10 +369,6 @@ def get_all_interface_info() -> dict:
370369
"SimaSegmentationInterface",
371370
]
372371

373-
# Plexon2 is only supported on Windows
374-
if sys.platform != "win32":
375-
exclude_interfaces_from_selection.append("Plexon2RecordingInterface")
376-
377372
return {
378373
getattr(interface, "display_name", interface.__name__) or interface.__name__: derive_interface_info(interface)
379374
for interface in interface_list

0 commit comments

Comments
 (0)