Skip to content

UPSTREAM PR #17925: Webui: Disable attachment button and model selector button when prompt textbox is disabled.#521

Open
loci-dev wants to merge 8 commits intomainfrom
upstream-PR17925-branch_dariusjlukas-webui-chatformaction-disable-flag
Open

UPSTREAM PR #17925: Webui: Disable attachment button and model selector button when prompt textbox is disabled.#521
loci-dev wants to merge 8 commits intomainfrom
upstream-PR17925-branch_dariusjlukas-webui-chatformaction-disable-flag

Conversation

@loci-dev
Copy link

Mirrored from ggml-org/llama.cpp#17925

Description

Prevent the user from interacting with either the attachment button or the model selector button when the chat text input is disabled.

Changes

Pass the disabled state to the file attachment's DropdownMenu Trigger and to the ModelsSelector.

Before After
Screenshot-file-attach-enabled Screenshot-file-attach-disabled

@loci-dev loci-dev force-pushed the main branch 8 times, most recently from 4f731df to 8e6f6e8 Compare December 12, 2025 15:09
@loci-review
Copy link

loci-review bot commented Dec 12, 2025

Explore the complete analysis inside the Version Insights

Performance Analysis Summary - PR #521

Analysis Scope: Web UI component modifications for disabled state propagation

This PR introduces frontend-only changes to two Svelte UI components, adding disabled state handling to file attachment and model selector buttons. The performance analysis confirms zero impact on compiled binaries.

Performance Impact: None detected. All analyzed binaries show 0.0% change in power consumption. The modifications affect JavaScript UI components that are not compiled into the C/C++ inference binaries (libllama.so, libggml-*.so, llama-run, etc.).

Inference Performance: No impact on tokens per second. The changes do not modify any tokenization or inference functions (llama_decode, llama_encode, llama_tokenize). These functions remain unchanged in both response time and throughput.

Code Changes: Two single-line additions passing the disabled prop to UI components. No modifications to performance-critical areas including matrix operations, attention mechanisms, KV cache management, or quantization kernels.

@loci-review
Copy link

loci-review bot commented Dec 12, 2025

Explore the complete analysis inside the Version Insights

Performance Analysis Summary: PR #521

Overview

This PR modifies web UI components in the llama.cpp server interface, adding disabled state propagation to file attachment and model selector controls. The changes are confined to two Svelte frontend files with no modifications to the C/C++ inference engine or core libraries.

Performance Impact

No measurable performance impact. The modifications are purely declarative UI prop bindings in the web interface layer, completely isolated from the inference pipeline. Analysis of 16 binaries shows power consumption changes below 0.001% across all components, with the largest absolute change being 2 nJ in llama-run.

Tokens per Second: No impact. The inference-critical functions (llama_decode, llama_encode, llama_tokenize) remain unmodified. Response time and throughput metrics for tokenization and model execution are unchanged.

Modified Components:

  • ChatFormActionFileAttachments.svelte: Added disabled prop to DropdownMenu.Trigger
  • ChatFormActions.svelte: Added disabled prop to ModelsSelector component

Binary Analysis:
All analyzed binaries (libggml-base.so, libggml-cpu.so, libllama.so, llama-run, llama-bench, and others) show functionally identical performance characteristics between versions f15864a5 and f18a5f78.

@loci-review
Copy link

loci-review bot commented Dec 12, 2025

Explore the complete analysis inside the Version Insights

Performance Analysis Summary: PR #521

Scope: Web UI component modifications only - no performance-critical code affected.

This pull request modifies frontend Svelte components to properly disable file attachment and model selector buttons when the chat input is disabled. All changes are isolated to the web UI layer (tools/server/webui/) with no modifications to inference pipeline, model loading, tokenization, or any C/C++ core libraries.

Performance Impact: Zero impact on inference performance. Core libraries (libllama.so, libggml-cpu.so, libggml-base.so) show 0% change in power consumption. No functions in the inference path (llama_decode, llama_encode, llama_tokenize, ggml_mul_mat) were modified.

Binary Changes: Three utility binaries removed (llama-cvector-generator, llama-run, llama-tts) representing build configuration changes rather than performance optimization. All remaining binaries maintain identical power profiles.

Tokens per Second: No impact. The modified components are client-side JavaScript rendered in the browser and do not participate in token generation or model inference operations.

3 similar comments
@loci-review
Copy link

loci-review bot commented Dec 12, 2025

Explore the complete analysis inside the Version Insights

Performance Analysis Summary: PR #521

Scope: Web UI component modifications only - no performance-critical code affected.

This pull request modifies frontend Svelte components to properly disable file attachment and model selector buttons when the chat input is disabled. All changes are isolated to the web UI layer (tools/server/webui/) with no modifications to inference pipeline, model loading, tokenization, or any C/C++ core libraries.

Performance Impact: Zero impact on inference performance. Core libraries (libllama.so, libggml-cpu.so, libggml-base.so) show 0% change in power consumption. No functions in the inference path (llama_decode, llama_encode, llama_tokenize, ggml_mul_mat) were modified.

Binary Changes: Three utility binaries removed (llama-cvector-generator, llama-run, llama-tts) representing build configuration changes rather than performance optimization. All remaining binaries maintain identical power profiles.

Tokens per Second: No impact. The modified components are client-side JavaScript rendered in the browser and do not participate in token generation or model inference operations.

@loci-review
Copy link

loci-review bot commented Dec 12, 2025

Explore the complete analysis inside the Version Insights

Performance Analysis Summary: PR #521

Scope: Web UI component modifications only - no performance-critical code affected.

This pull request modifies frontend Svelte components to properly disable file attachment and model selector buttons when the chat input is disabled. All changes are isolated to the web UI layer (tools/server/webui/) with no modifications to inference pipeline, model loading, tokenization, or any C/C++ core libraries.

Performance Impact: Zero impact on inference performance. Core libraries (libllama.so, libggml-cpu.so, libggml-base.so) show 0% change in power consumption. No functions in the inference path (llama_decode, llama_encode, llama_tokenize, ggml_mul_mat) were modified.

Binary Changes: Three utility binaries removed (llama-cvector-generator, llama-run, llama-tts) representing build configuration changes rather than performance optimization. All remaining binaries maintain identical power profiles.

Tokens per Second: No impact. The modified components are client-side JavaScript rendered in the browser and do not participate in token generation or model inference operations.

@loci-review
Copy link

loci-review bot commented Dec 12, 2025

Explore the complete analysis inside the Version Insights

Performance Analysis Summary: PR #521

Scope: Web UI component modifications only - no performance-critical code affected.

This pull request modifies frontend Svelte components to properly disable file attachment and model selector buttons when the chat input is disabled. All changes are isolated to the web UI layer (tools/server/webui/) with no modifications to inference pipeline, model loading, tokenization, or any C/C++ core libraries.

Performance Impact: Zero impact on inference performance. Core libraries (libllama.so, libggml-cpu.so, libggml-base.so) show 0% change in power consumption. No functions in the inference path (llama_decode, llama_encode, llama_tokenize, ggml_mul_mat) were modified.

Binary Changes: Three utility binaries removed (llama-cvector-generator, llama-run, llama-tts) representing build configuration changes rather than performance optimization. All remaining binaries maintain identical power profiles.

Tokens per Second: No impact. The modified components are client-side JavaScript rendered in the browser and do not participate in token generation or model inference operations.

@loci-review
Copy link

loci-review bot commented Dec 16, 2025

Explore the complete analysis inside the Version Insights

Performance Analysis Summary: PR #521

Analysis Scope: Web UI disabled state propagation changes across 3 Svelte components.

Condition Assessment: Condition 1 applies - no performance-critical code modifications.

This PR modifies frontend UI components only, with no changes to C/C++ inference engine, model loading, tokenization, or any performance-critical paths identified in the llama.cpp architecture. The changes propagate disabled state to file attachment and model selector buttons in the web interface. Power consumption analysis shows 0.0% change across all 16 binaries including libllama.so, libggml-cpu.so, and libggml-base.so. No functions in the inference pipeline were modified.

@loci-dev loci-dev force-pushed the main branch 28 times, most recently from 81e654d to c785ce2 Compare December 18, 2025 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants