Skip to content

[QOL improvement] Expose CodeNomad server arguments for configuration in Electron app #130

@VooDisss

Description

@VooDisss

Component: packages/electron-app

Image

Description:

The CodeNomad CLI server (packages/server) offers a comprehensive set of arguments for configuring its behavior, network settings, security, and workspace management, as seen in the codenomad --help output. Currently, users of the electron-app wrapper primarily interact with these configurations indirectly or via environment variables/CLI, which can be cumbersome and limit discoverability for a desktop application user.

As demonstrated by the "Remote Handover" modal in the provided image, there's a clear need for users to control aspects like host binding, server passwords, and potentially other network-related configurations to enable remote access effectively. The "Failed to fetch" error for "Reachable addresses" further highlights the current lack of user-facing controls for server communication.

Problem:

  • Limited User Control: Key server operational parameters are not easily configurable through the Electron application's UI, forcing users into CLI or environment variable manipulation.
  • Poor Discoverability: Users may not be aware of the available server configurations or how to apply them, especially those less familiar with command-line tools.
  • Suboptimal Remote Handover Experience: Features like "Listening mode" and "Server password" hint at remote capabilities, but without direct UI configuration for underlying server arguments (--host, --username, --password, --https-port, etc.), the remote handover setup can be opaque and difficult to troubleshoot (e.g., the "Failed to fetch" message).
  • Debugging Challenges: Without UI access to --log-level or --log-destination, debugging server-side issues can be more challenging for end-users.

Arguments to consider exposing in the UI (with appropriate explanations and validation):

  • Network/Host Configuration:
    • --host <host>: Allow users to specify the host interface for remote connections (e.g., "127.0.0.1", "0.0.0.0" for all interfaces). This directly relates to the "Listening mode" in the UI.
    • --https <enabled>, --http <enabled>: Enable/disable secure and insecure listeners.
    • --https-port <number>, --http-port <number>: Configure specific ports, with options for auto-assignment (0).
  • Security/Authentication:
    • --tls-key <path>, --tls-cert <path>, --tls-ca <path>, --tlsSANs <list>: For advanced users requiring custom TLS certificates.
    • --username <username>, --password <password>: Crucial for "Server password" functionality shown in the remote handover modal.
    • --dangerously-skip-auth: Provide a warning and an option for advanced users.
  • Workspace & Filesystem:
    • --workspace-root <path>: Allow users to define the default workspace root.
    • --unrestricted-root: Provide an option to allow browsing the full filesystem with appropriate warnings.
  • Logging:
    • --log-level <level>: Allow users to set the log verbosity (trace|debug|info|warn|error).
    • --log-destination <path>: Configure a file for log output.

Proposed Solution:

Introduce an "Advanced Settings" or "Server Configuration" section within the electron-app's UI (perhaps accessible from the existing "Advanced Settings" link in the sidebar). This section should provide user-friendly controls (input fields, toggles, file pickers) for the most relevant server arguments, ensuring proper validation and clear explanations for each option. This will empower users to configure CodeNomad more precisely to their needs, especially for remote development and debugging scenarios.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions