Commit Graph

481 Commits

Author SHA1 Message Date
Val Alexander
441426af87 fix: wire handleChatGatewayEvent to replace inline chat handler 2026-03-09 17:39:30 -05:00
Val Alexander
df82c4998d fix(ui): address 4 review comments on dashboard-v2
- Reset chat module state on tab navigation (stops STT leak)
- Extract exportChatMarkdown to shared helper (deduplicate)
- Move theme listener cleanup to host instance (fix stale ref)
- Load cron runs on initial Cron tab open
2026-03-09 17:32:00 -05:00
Radek Sienkiewicz
f2f561fab1 fix(ui): preserve control-ui auth across refresh (#40892)
Merged via squash.

Prepared head SHA: f9b2375892
Co-authored-by: velvet-shark <126378+velvet-shark@users.noreply.github.com>
Co-authored-by: velvet-shark <126378+velvet-shark@users.noreply.github.com>
Reviewed-by: @velvet-shark
2026-03-09 12:50:47 +01:00
Peter Steinberger
e0f80cf0e9 fix(ui): align control-ui device auth token signing 2026-03-08 05:41:03 +00:00
Ayaan Zaidi
930caeaafb fix(chat): preserve sender labels in dashboard history 2026-03-08 09:17:02 +05:30
Vincent Koc
0125bd9639 Agents UI: complete config state test fixture 2026-03-07 18:24:41 -08:00
Vincent Koc
96f4f50f51 Agents UI: compose save state from config state 2026-03-07 18:24:41 -08:00
Peter Steinberger
c0a7c302f3 fix: preserve agents-page selection after config save
Landed from contributor PR #39301 by @MumuTW.

Co-authored-by: MumuTW <clothl47364@gmail.com>
2026-03-08 02:20:48 +00:00
Peter Steinberger
49261b0d82 fix: auto-create inherited agent override entries
Landed from contributor PR #39326 by @dunamismax.

Co-authored-by: dunamismax <dunamismax@tutamail.com>
2026-03-08 02:12:33 +00:00
Vincent Koc
73e510cdf4 Gateway UI: allowlist device key fixtures 2026-03-07 16:27:00 -08:00
Peter Steinberger
5f26970200 fix(ui): land #28608 from @KimGLee
Landed from contributor PR #28608 by @KimGLee.

Co-authored-by: Kim <150593189+KimGLee@users.noreply.github.com>
2026-03-07 23:26:09 +00:00
Altay
bfbe80ab7d test(ui): reduce gateway client test mocking (#39251) 2026-03-08 01:58:44 +03:00
Peter Steinberger
3a74dc00bf fix(gateway): land #38725 from @ademczuk
Source: #38725 / 533ff3e70b by @ademczuk.
Thanks @ademczuk.

Co-authored-by: ademczuk <andrew.demczuk@gmail.com>
2026-03-07 22:35:38 +00:00
Peter Steinberger
8ca326caa9 fix(ui): land #37382 from @FradSer
Separate shared gateway auth from cached device-token signing in Control UI browser auth. Preserves shared-token validation while keeping cached device tokens scoped to signed device payloads.

Co-authored-by: Frad LEE <fradser@gmail.com>
2026-03-07 22:33:24 +00:00
Peter Steinberger
a617cd7b79 fix(test): restore long dep for full vitest gate 2026-03-07 21:23:06 +00:00
Peter Steinberger
e3c21c913d fix(ci): refresh secret baseline and UI state types 2026-03-07 21:17:57 +00:00
Altay
97f9e25525 fix(ci): restore strip-ansi and typecheck fixtures (#39146)
* fix: restore strip-ansi and typecheck fixtures

* test: normalize windows install path assertions
2026-03-07 23:13:13 +03:00
Peter Steinberger
de2ccffec1 fix(ui): stream tool events live in control chat (#39104)
Land #39104 by @jakepresent.

Co-authored-by: Jake Present <jakepresent@microsoft.com>
2026-03-07 19:27:17 +00:00
Peter Steinberger
10d0e3f3ca fix(dashboard): keep gateway tokens out of URL storage 2026-03-07 18:33:30 +00:00
Vincent Koc
e4d80ed556 CI: restore main detect-secrets scan (#38438)
* Tests: stabilize detect-secrets fixtures

* Tests: fix rebased detect-secrets false positives

* Docs: keep snippets valid under detect-secrets

* Tests: finalize detect-secrets false-positive fixes

* Tests: reduce detect-secrets false positives

* Tests: keep detect-secrets pragmas inline

* Tests: remediate next detect-secrets batch

* Tests: tighten detect-secrets allowlists

* Tests: stabilize detect-secrets formatter drift
2026-03-07 10:06:35 -08:00
Ayaan Zaidi
4bf902de58 fix: flatten remote markdown images 2026-03-07 19:46:41 +05:30
Peter Steinberger
8db5d67768 chore: update dependencies except carbon 2026-03-07 10:55:18 +00:00
Peter Steinberger
997a9f5b9e chore: bump version to 2026.3.7 2026-03-07 10:09:02 +00:00
Vincent Koc
42e3d8d693 Secrets: add inline allowlist review set (#38314)
* Secrets: add inline allowlist review set

* Secrets: narrow detect-secrets file exclusions

* Secrets: exclude Docker fingerprint false positive

* Secrets: allowlist test and docs false positives

* Secrets: refresh baseline after allowlist updates

* Secrets: fix gateway chat fixture pragma

* Secrets: format pre-commit config

* Android: keep talk mode fixture JSON valid

* Feishu: rely on client timeout injection

* Secrets: allowlist provider auth test fixtures

* Secrets: allowlist onboard search fixtures

* Secrets: allowlist onboard mode fixture

* Secrets: allowlist gateway auth mode fixture

* Secrets: allowlist APNS wake test key

* Secrets: allowlist gateway reload fixtures

* Secrets: allowlist moonshot video fixture

* Secrets: allowlist auto audio fixture

* Secrets: allowlist tiny audio fixture

* Secrets: allowlist embeddings fixtures

* Secrets: allowlist resolve fixtures

* Secrets: allowlist target registry pattern fixtures

* Secrets: allowlist gateway chat env fixture

* Secrets: refresh baseline after fixture allowlists

* Secrets: reapply gateway chat env allowlist

* Secrets: reapply gateway chat env allowlist

* Secrets: stabilize gateway chat env allowlist

* Secrets: allowlist runtime snapshot save fixture

* Secrets: allowlist oauth profile fixtures

* Secrets: allowlist compaction identifier fixture

* Secrets: allowlist model auth fixture

* Secrets: allowlist model status fixtures

* Secrets: allowlist custom onboarding fixture

* Secrets: allowlist mattermost token summary fixtures

* Secrets: allowlist gateway auth suite fixtures

* Secrets: allowlist channel summary fixture

* Secrets: allowlist provider usage auth fixtures

* Secrets: allowlist media proxy fixture

* Secrets: allowlist secrets audit fixtures

* Secrets: refresh baseline after final fixture allowlists

* Feishu: prefer explicit client timeout

* Feishu: test direct timeout precedence
2026-03-06 19:35:26 -05:00
Val Alexander
43430d4900 fix(ui): resolve remaining important and minor issues
4. fix(theme): prevent stale theme listener after component remount
   - Replace module-level systemThemeCleanup with WeakMap keyed by host
   - Prevents stale closure responding to theme changes after remount
   - Addresses Greptile test/HMR issue

5. fix(security): validate usage/cost metadata from chat history
   - Add sanitizeUsage() and sanitizeCost() helpers
   - Validate numeric fields are finite numbers
   - Only allow usage/cost on assistant messages
   - Prevents UI crash from malformed transcript JSON (cost.toFixed on non-number)
   - Addresses Aisle Security Low severity (but UI-breaking) issue

6. refactor(chat): deduplicate export functions
   - Extract exportChatMarkdown to shared chat-export.ts module
   - Remove duplicate from app.ts and chat.ts
   - Prevents silent divergence during maintenance
   - Addresses Greptile technical debt concern

7. fix(security): add noopener to external links
   - Use buildExternalLinkRel() helper in overview-attention.ts
   - Prevents reverse tabnabbing on attention item doc links
   - Addresses Aisle Security Low severity CWE-1022

8. fix(security): scan raw config for sensitive keywords in stream mode
   - Add containsSensitiveKeywords() helper
   - Check props.raw for token/password/secret/apiKey patterns
   - Redact raw textarea when keywords detected in stream mode
   - Prevents newly-entered secrets from staying visible before parse
   - Addresses Aisle Security Low severity issue
2026-03-06 03:29:45 -06:00
Val Alexander
f4f8eac3a3 fix(ui): resolve 3 critical security and UX issues
1. fix(security): prevent JSON DoS via size cap on auto-parse
   - Add MAX_JSON_AUTOPARSE_CHARS (20KB) to detectJson()
   - Prevents UI freeze from multi-MB JSON in assistant/tool messages
   - Addresses Aisle Security High severity CWE-400

2. fix(ux): prevent STT transcripts going to wrong session
   - Add cleanupChatModuleState() export in chat.ts
   - Call cleanup in applyTabSelection when leaving chat tab
   - Stops active recording to prevent voice input to unintended session
   - Addresses Greptile critical UX bug

3. fix(security): redact sensitive values in config diff panel
   - Add renderDiffValue() with stream-mode + sensitive-path checks
   - Use in diff panel rendering instead of raw truncateValue()
   - Prevents secrets from appearing during screen sharing
   - Addresses Aisle Security Medium severity CWE-200
2026-03-06 00:47:59 -06:00
Val Alexander
39020f8d62 feat: enhance sensitive data handling in config forms
- Updated config form tests to ensure sensitive values are properly managed and revealed based on user interactions.
- Refactored sensitive input rendering logic to support toggling visibility and redaction based on stream mode.
- Improved state management for sensitive paths, allowing for better control over when sensitive data is displayed.
- Added utility functions to identify and handle sensitive configuration data throughout the application.
- Enhanced UI components to reflect changes in sensitive data handling, ensuring a consistent user experience.
2026-03-05 18:25:14 -06:00
Val Alexander
1e440712fb feat: enhance chat history and error handling in UI
- Added a test to ensure chat.history preserves usage and cost metadata for assistant messages.
- Updated chat message sanitization to retain usage and cost information for UI rendering.
- Enhanced the AppViewState and UI components to include lastErrorCode for improved error handling.
- Implemented new utility functions in overview hints to manage authentication and context errors.
- Updated tests to cover new functionality and ensure correct behavior in various scenarios.
2026-03-05 18:15:41 -06:00
Val Alexander
cfec9a268a feat: integrate tools catalog functionality into agent management
- Added support for loading and displaying a tools catalog in the agent management interface.
- Enhanced the AppViewState to include loading, error, and result states for the tools catalog.
- Implemented loadToolsCatalog function to fetch tools based on the selected agent.
- Updated UI components to reflect tools catalog loading states and errors.
- Refactored agent tools rendering logic to utilize the new tools catalog data structure.
2026-03-05 17:57:47 -06:00
Val Alexander
58c96468cf feat: implement /kill command for managing sub-agent sessions
- Enhanced the executeSlashCommand function to support the /kill command, allowing users to abort sub-agent sessions.
- Added logic to handle both "kill all" and "kill <agentId>" scenarios, providing appropriate feedback based on the number of sessions aborted.
- Introduced a new utility function, resolveKillTargets, to identify matching sub-agent sessions based on the provided target.
- Added unit tests for the /kill command to ensure correct functionality and response messages.
2026-03-05 17:48:29 -06:00
Val Alexander
1f1f444aa1 ui: refactor dashboard-v2 structure and behavior 2026-03-05 17:24:37 -06:00
Vincent Koc
0c08e3f55f UI: hoist lifecycle connect test mocks (#36788) 2026-03-05 17:15:31 -05:00
Vincent Koc
999b7e4edf fix(ui): bump dompurify to 3.3.2 (#36781)
* UI: bump dompurify to 3.3.2

* Deps: refresh dompurify lockfile
2026-03-05 17:08:42 -05:00
Bin Deng
edc386e9a5 fix(ui): catch marked.js parse errors to prevent Control UI crash (#36445)
- Prevent Control UI session render crashes when `marked.parse()` encounters pathological recursive markdown by safely falling back to escaped `<pre>` output.
- Tighten markdown fallback regression coverage and keep changelog attribution in sync for this crash-hardening path.

Co-authored-by: Bin Deng <dengbin@romangic.com>
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
2026-03-05 13:46:49 -06:00
Sid
3a6b412f00 fix(gateway): pass actual version to Control UI client instead of dev (#35230)
* fix(gateway): pass actual version to Control UI client instead of "dev"

The GatewayClient, CLI WS client, and browser Control UI all sent
"dev" as their clientVersion during handshake, making it impossible
to distinguish builds in gateway logs and health snapshots.

- GatewayClient and CLI WS client now use the resolved VERSION constant
- Control UI reads serverVersion from the bootstrap endpoint and
  forwards it when connecting
- Bootstrap contract extended with serverVersion field

Closes #35209

* Gateway: fix control-ui version version-reporting consistency

* Control UI: guard deferred bootstrap connect after disconnect

* fix(ui): accept same-origin http and relative gateway URLs for client version

---------

Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
2026-03-05 00:01:34 -06:00
不做了睡大觉
8891e1e48d fix(web-ui): render Accounts schema node properly (#35380)
Co-authored-by: stakeswky <64798754+stakeswky@users.noreply.github.com>
Co-authored-by: liuxiaopai-ai <73659136+liuxiaopai-ai@users.noreply.github.com>
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
2026-03-04 23:50:18 -06:00
Darshil
b3fb881a73 fix: finalize spanish locale support 2026-03-04 15:29:52 -08:00
Peter Steinberger
2380c1b5fd refactor(ui): dedupe inline code wrap rules 2026-03-03 02:19:34 +00:00
HCL
7c90ef7c52 fix(webui): prevent inline code from breaking mid-token on copy/paste
The parent `.chat-text` applies `overflow-wrap: anywhere; word-break: break-word;`
which forces long tokens (UUIDs, hashes) inside inline `<code>` to break across
visual lines. When copied, the browser injects spaces at those break points,
corrupting the pasted value.

Override with `overflow-wrap: normal; word-break: keep-all;` on inline `<code>`
selectors so tokens stay intact.

Fixes #32230

Signed-off-by: HCL <chenglunhu@gmail.com>
2026-03-03 02:05:37 +00:00
Peter Steinberger
3e4dd84511 fix: webchat gfm table rendering and overflow (#32365) (thanks @BlueBirdBack) 2026-03-03 01:14:30 +00:00
Ash (Bug Lab)
5084621f43 fix(ui): ensure GFM tables render in WebChat markdown (#20410)
- Pass gfm:true + breaks:true explicitly to marked.parse() so table
  support is guaranteed even if global setOptions() is bypassed or
  reset by a future refactor (defense-in-depth)
- Add display:block + overflow-x:auto to .chat-text table so wide
  multi-column tables scroll horizontally instead of being clipped
  by the parent overflow-x:hidden chat container
- Add regression tests for GFM table rendering in markdown.test.ts
2026-03-03 01:14:30 +00:00
Peter Steinberger
86090b0ff2 docs(models): refresh minimax kimi glm provider docs 2026-03-03 00:40:15 +00:00
Peter Steinberger
0e16749f00 ci: fix lint and audit regressions on main 2026-03-02 23:08:23 +00:00
Mark L
5b5ccb0769 fix(ui): avoid toSorted in cron suggestions (#31775)
* Control UI: avoid toSorted in cron suggestions

* Control UI: make sortLocaleStrings legacy-safe

* fix(ui): use sort fallback in locale string helper

* fix(ui): remove toSorted from locale helper

* fix(ui): remove toSorted from locale helper

* fix(ui): remove toSorted from locale helper

* fix(ui): remove toSorted from locale helper

* fix(ui): remove toSorted from locale helper

* fix(ui): avoid sort in locale helper for browser compatibility

* ui: avoid unnecessary assertions in locale sort

* changelog: credit browser-compat cron fix PR

* fix(ui): use native locale sort in compatibility helper

* ui: use compat merge-sort for locale strings

* style: format locale sort helper

* style: fix oxfmt ordering in agents utils

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-03-02 14:41:01 -08:00
ademczuk
0743463b88 fix(webchat): suppress NO_REPLY token in chat transcript rendering (#32183)
* fix(types): resolve pre-existing TS errors in agent-components and pairing-store

- agent-components.ts: normalizeDiscordAllowList returns {allowAll, ids, names},
  not an array — use ids.values().next().value instead of [0] indexing
- pairing-store.ts: add non-null assertions for stat after cache-miss guard
  (resolveAllowFromReadCacheOrMissing returns early when stat is null)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(webchat): suppress NO_REPLY token in chat transcript rendering

Filter assistant NO_REPLY-only entries from chat.history responses at
the gateway API boundary and add client-side defense-in-depth guards in
the UI chat controller so internal silent tokens never render as visible
chat bubbles.

Two-layer fix:
1. Gateway: extractAssistantTextForSilentCheck + isSilentReplyText
   filter in sanitizeChatHistoryMessages (entry.text takes precedence
   over entry.content to avoid dropping messages with real text)
2. UI: isAssistantSilentReply + isSilentReplyStream guards on all 5
   message insertion points in handleChatEvent and loadChatHistory

Fixes #32015

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(webchat): align isAssistantSilentReply text/content precedence with gateway

* webchat: tighten NO_REPLY transcript and delta filtering

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
2026-03-02 16:39:08 -06:00
Peter Steinberger
eb816e0551 refactor: dedupe extension and ui helpers 2026-03-02 19:57:33 +00:00
Peter Steinberger
8768487aee refactor(shared): dedupe protocol schema typing and session/media helpers 2026-03-02 19:57:33 +00:00
SidQin-cyber
15226b0b83 fix(gateway): persist streamed text when webchat final event lacks message
When an agent streams text and then immediately runs tool calls, the
webchat UI drops the streamed content: the "final" event arrives with
message: undefined (buffer consumed by sub-run), and the client clears
chatStream without saving it to chatMessages.

Before clearing chatStream on a "final" event, check whether the stream
buffer has content. If no finalMessage was provided but the stream is
non-empty, synthesize an assistant message from the buffered text —
mirroring the existing "aborted" handler's preservation logic.

Closes #31895
2026-03-02 19:54:26 +00:00
ningding97
9c1312b5e4 fix(ui): handle SecretInput union in config form analyzer
The config form marks models.providers as unsupported because
SecretInputSchema creates a oneOf union that the form analyzer
cannot handle. Add detection for secret-ref union variants and
normalize them to plain string inputs for form display.

Closes #31490
2026-03-02 18:35:15 +00:00
Val Alexander
eb2e20c994 fix(ui): preserve margin-top: 0 for onboarding mode
- Change margin from -12px -16px -32px to 0 -16px -32px
- Preserves zero top offset required for onboarding mode
- Prevents clipping of top edge/actions area when padding-top: 0
2026-03-02 11:01:27 -06:00