GUI has no way to rename a VM (Name column missing from inline-edit columns, despite backend support)

Open Beginner friendly
#95 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
c, javascript
Domain
frontend

Research direction

Start in web/app.js by reading makeCell, startInlineEdit, and commitInlineEdit, then inspect the existing editVm handling in ui.c. Add the Name column to the inline-edit path and ensure it maps to field: "name". Done means a stopped VM's Name cell accepts text in edit mode and submits the rename through the existing backend support.

Written by the indexing model from the issue text.

Description

Summary

The backend fully supports renaming a VM (asb_vm_set_name() in asb_core.c, wired up to the
editVm command with field: "name" in ui.c), but the GUI's inline-edit table never exposes
the Name column as editable, so there is no way to rename a VM from the GUI.

Reproduction

  1. Create a VM, stop it.
  2. Click Edit (✏️) to enter edit mode for the row (icon changes to ✔️).
  3. Click on the VM's Name cell.
  4. Nothing happens — no input field appears, unlike the CPU/RAM/GPU/Network cells.

Root cause

In web/app.js, the inline-edit click handler only wires up columns 4, 5, 7, and 8:

/* Editable columns: 4=CPU, 5=RAM, 7=GPU, 8=Network */
if (editModeRow === row && (col === 4 || col === 5 || col === 7 || col === 8)) {
    td.style.cursor = 'pointer';
    td.title = 'Click to edit';
    td.onclick = function(e) {
        e.stopPropagation();
        startInlineEdit(row, col, td);
    };
}

The Name column (col 1) is not included, so startInlineEdit is never called for it, and no
onclick is ever attached to that cell.

Meanwhile the backend is fully ready to handle it:

// asb_core.c
ASB_API HRESULT asb_vm_set_name(AsbVm vm, const wchar_t *name)
{
    ...
    if (inst->running) return E_ACCESSDENIED;
    if (!name || name[0] == L'\0') return E_INVALIDARG;

    for (i = 0; i < g_vm_count; i++) {
        if (i != idx && _wcsicmp(g_vms[i].name, name) == 0) {
            asb_log(L"Name \"%s\" is already in use.", name);
            return E_INVALIDARG;
        }
    }
    wcscpy_s(inst->name, 256, name);
    save_vm_list();
    ...
}
// ui.c, editVm dispatch
if (wcscmp(field, L"name") == 0) asb_vm_set_name(vm, value);

The headless HTTP/JSON API can already rename a VM today by sending editVm with
field: "name" — it's purely a missing GUI affordance.

Suggested fix

Add the Name column (col 1, or whichever index it is in the row layout) to the editable-column
check in makeCell, and handle it as a text input in startInlineEdit / commitInlineEdit
(mapping to field: 'name'), similar to how CPU/RAM already work as plain text inputs. Probably
also want the same duplicate-name validation surfaced in the UI (the backend already returns
E_INVALIDARG + logs "Name is already in use", so the existing asb_log output would need to
reach the user, or the commit could check vms client-side before sending).

Environment

  • App Sandbox version: (latest as of 2026-07)
  • OS: Windows 11
Dominant language
C
Stars
704
Forks
75
Avg merge
9m
Merged PRs (30d)
6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from jamesstringer90/appsandbox

All issues in jamesstringer90/appsandbox

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.