Commit Graph

1830 Commits

Author SHA1 Message Date
Abhinav Raut 6496cdec28 Merge pull request #456 from abhinavxd/fix/http-write-timeout
increase default http write timeout to 60s
v2.6.0
2026-07-31 10:44:51 +05:30
Abhinav Raut def21f893f increase default http write timeout to 60s 2026-07-31 10:42:37 +05:30
Abhinav Raut 189c0860e1 Merge pull request #455 from abhinavxd/chore/tidy-migration-comments
remove redundant comments in v2.6.0 migration
2026-07-31 10:20:57 +05:30
Abhinav Raut 232d445442 Merge pull request #454 from amaanJvd/fix/unsnoozer-dropped-error-log
fix(log): don't drop the error detail in unsnoozeAll log call
2026-07-31 10:20:28 +05:30
Abhinav Raut 081cc46aa2 remove redundant comments in v2.6.0 migration 2026-07-31 10:19:51 +05:30
amaanJvd 3d5d67b554 fix(log): don't drop the error in unsnoozeAll log call
The error was passed as a positional argument without a key. logf drops
the last field when the field count is odd (handleLog: "If there are odd
number of fields, ignore the last"), so the actual error was silently
discarded and the log line carried no diagnostic detail when the
unsnooze query failed. Pass it as an "error" key/value like everywhere
else in the codebase.
2026-07-30 18:23:26 -07:00
Abhinav Raut ee3a54773e Merge pull request #453 from abhinavxd/fix/ai-misc
hardcode copilot name and tidy up AI admin copy
2026-07-31 03:57:05 +05:30
Abhinav Raut c25452a152 remove redundant snippet URL import hint 2026-07-31 03:53:37 +05:30
Abhinav Raut f2edc74e18 hardcode copilot name and tidy up AI admin copy 2026-07-31 03:50:39 +05:30
Abhinav Raut 859777dfb4 Merge pull request #447 from abhinavxd/feat/ai-tag-embeddings
shortlist tags with embeddings before asking the LLM to suggest them
2026-07-31 02:46:14 +05:30
Abhinav Raut 5e7b1afc97 Merge pull request #451 from abhinavxd/fix/inline-cid-case-and-tx-linking
link message media in one query inside the insert transaction
2026-07-31 02:35:58 +05:30
Abhinav Raut 06242de1e0 Merge remote-tracking branch 'origin/main' into fix/inline-cid-case-and-tx-linking 2026-07-31 02:20:46 +05:30
Abhinav Raut 52a455f1e8 link message media in one query inside the insert transaction
Message attachments and inline images are now linked with a single UPDATE
that runs in the same transaction as the message insert, so a failure can no
longer leave media orphaned. The inline content_id is stamped by the query
itself, and inlineContentID lowercases the uuid to match it - an uppercase
hex uuid in an image URL used to save a cid the DB never matched, so the
image rendered broken. Drops the now unused Attach and SetContentID.
2026-07-31 02:20:01 +05:30
Abhinav Raut 3544a80a51 Merge pull request #450 from abhinavxd/fix/s3-thumbnail-preview
Fix live chat image thumbnails for S3 store.
2026-07-31 02:12:31 +05:30
Abhinav Raut cda53690b0 use shared attachment URL signing in message handlers 2026-07-31 01:55:41 +05:30
Abhinav Raut 75a092514b Fix WS image URLs 2026-07-31 01:26:40 +05:30
Abhinav Raut 205ad8a29e Serve thumbnails inline 2026-07-31 01:20:37 +05:30
Abhinav Raut b553e9625c Keep widget images inline 2026-07-31 01:15:55 +05:30
Abhinav Raut 37224b1030 Clarify thumbnail store handling 2026-07-31 01:11:12 +05:30
Abhinav Raut 79da9e8988 Fix live chat image thumbnails 2026-07-31 01:05:32 +05:30
Abhinav Raut 11d0b523ff bound the tag query by tokens and always clear the tag index on purge 2026-07-30 23:21:07 +05:30
Abhinav Raut 000d789ed8 shortlist tags with embeddings before asking the LLM to suggest them
Tag suggestion used to send the first 300 tags to the model, so anything past
that was invisible. Tags are now embedded into the same index as the knowledge
base, and only the tags most similar to the conversation get sent. The reconcile
loop embeds new and renamed tags and drops vectors for deleted ones, and a
provider change purges them so they are rebuilt with the new model.
2026-07-30 23:09:23 +05:30
Abhinav Raut 9c1c413f4a Merge pull request #446 from abhinavxd/fix-ai-reply-markdown
render the generated reply as html instead of showing raw markdown
2026-07-30 17:00:44 +05:30
Abhinav Raut 16b99069b9 render the generated reply as html instead of showing raw markdown 2026-07-30 16:52:56 +05:30
Abhinav Raut fb4d665ca7 Merge pull request #421 from abhinavxd/feat/ai-agent
Feat/ai agent
2026-07-30 01:07:34 +05:30
Abhinav Raut 5e972d1dc5 point each AI admin page's docs link at its section anchor 2026-07-30 00:49:48 +05:30
Abhinav Raut bbcc92f2f3 add an aria-label to the channel icon in the conversation list 2026-07-30 00:47:29 +05:30
Abhinav Raut 276f19de0a show enabled state as a status badge and stop making checkbox fields required 2026-07-30 00:25:56 +05:30
Abhinav Raut f271462119 dedup mined FAQs against question and answer so near-duplicate suggestions get caught 2026-07-30 00:10:10 +05:30
Abhinav Raut 82f29f2789 fix Vue onUnmounted warning on the auth pages 2026-07-30 00:02:35 +05:30
Abhinav Raut 0b2ad13a0a Merge pull request #443 from abhinavxd/dependabot/npm_and_yarn/frontend/postcss-8.5.18
build(deps-dev): bump postcss from 8.5.10 to 8.5.18 in /frontend
2026-07-28 10:56:39 +05:30
dependabot[bot] 349e695fad build(deps-dev): bump postcss from 8.5.10 to 8.5.18 in /frontend
Bumps [postcss](https://github.com/postcss/postcss) from 8.5.10 to 8.5.18.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.5.10...8.5.18)

---
updated-dependencies:
- dependency-name: postcss
  dependency-version: 8.5.18
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-26 21:30:33 +00:00
Abhinav Raut 4ec387a5ca Merge pull request #442 from abhinavxd/i18n-guard
add CI check to block edits to translated i18n files
2026-07-27 02:59:35 +05:30
Abhinav Raut 1c500edc70 Revert "temp: test i18n guard, do not merge"
This reverts commit bcfbd45455.
2026-07-27 02:53:53 +05:30
Abhinav Raut bcfbd45455 temp: test i18n guard, do not merge 2026-07-27 02:51:27 +05:30
Abhinav Raut 6d7ce3c013 require a verified contact in the example tools server and fix its README mismatches 2026-07-27 02:48:02 +05:30
Abhinav Raut 71fb197826 bump the default completion model off gpt-4o-mini 2026-07-27 02:39:57 +05:30
Abhinav Raut 8db2e34ab5 show specific AI provider errors instead of a generic message 2026-07-27 02:26:33 +05:30
Abhinav Raut c25ad46729 run i18n guard from the base branch and fail on API errors 2026-07-27 02:12:44 +05:30
Abhinav Raut e8e2419705 show a clear error when the AI agent runs out of steps and hoist openai response structs 2026-07-27 01:47:06 +05:30
Abhinav Raut 763bcd61d9 add CI check to block edits to translated i18n files 2026-07-27 01:12:58 +05:30
Abhinav Raut fd21893ebc cache AI assistants in a store instead of refetching on every copilot panel mount 2026-07-26 23:06:54 +05:30
Abhinav Raut b569777cf6 match email quote classes exactly and enforce password length on set password 2026-07-25 21:46:17 +05:30
Abhinav Raut 49c5cb3493 make AI agent max steps and history size configurable
Two AI agent limits were hardcoded in Go: the tool-calling budget per reply
(6) and the number of conversation messages sent to the model as history
(30). Large installs need to tune these, so both are now read from
config.toml as ai_agent.max_steps and ai_agent.max_history_messages.

Defaults are unchanged, so an install that does not set the keys behaves
exactly as before. Values are clamped at the config read layer, 1-20 for
max_steps and 5-100 for history, so a typo cannot burn tokens on a runaway
loop or drop the model's context to nothing.

Also drop the dead re-slice in buildHistory. The message fetch already
limits to max_history_messages and the filter above it only removes
messages, so the second clamp could never fire.
2026-07-25 17:16:59 +05:30
Abhinav Raut 6b8a0f9521 fix content loss in knowledge base chunking and harden AI agent limits
Final review pass before taking the AI agent branch live.

Knowledge base:
- Text not wrapped in a block tag was never collected, so prose around a
  table or list never reached the index. The assistant answered "no
  relevant information" for questions the snippet covered.
- Blocks over the token limit were truncated and the remainder dropped. They
  are split into several chunks now.
- Trimming an oversized block ran one rune at a time and re-tokenized the
  whole string each step. A large table took minutes. It uses a binary
  search now.
- Overlap text was not escaped, so a sentence containing markup swallowed
  the rest of the chunk.
- SVG and template text no longer reaches the index.

AI agent:
- Verification codes are capped per address and per conversation. The cap
  was per conversation only, so a customer correcting a mistyped email was
  told to check an inbox that never got a code.
- Livechat verification sends synchronously. A queued send returned nil even
  when SMTP failed, so a failure counted as a sent code.
- Queued jobs drain on shutdown and hand off to a human instead of being
  dropped with no reply.
- Deleting an assistant no longer moves resolved and closed conversations
  into the fallback team.
- Image decode is capped at 25 MP. The old bound allowed a 400 MB decode per
  attachment.

Auth and admin:
- A blank OIDC client secret no longer overwrites the stored one. Blank id
  or secret is rejected instead.
- OIDC token exchange uses the SSRF guarded client with a timeout.
- Renaming a tool auth header no longer attaches the secret of whichever row
  now sits at that position.
- Clearing embedding dimensions no longer refills 1536 on the next load,
  which pushed a wrong value to the provider on the next save.
- Copilot conversation lookups filter by access before capping at 10.
2026-07-25 03:52:32 +05:30
Abhinav Raut 9f8f10ae74 drop the unenforced-rules section from the design doc 2026-07-25 00:55:29 +05:30
Abhinav Raut 23938a187a rename the design doc to DESIGN.md and resync it with the code
The surfaces section still described the old gray sidebar and the pre-swap
canvas values. Sidebar background now matches the app background in both
themes, so the tier diagram was wrong.

Also documents what the code already does: the .box, .sidebar-section-label
and .link-style utilities, the badge success variant, the variant prop on
AlertDialogAction, the hover-reveal pattern for table row actions, and the
rule that every non-submit button in a form needs type="button". Trimmed the
prose throughout.
2026-07-25 00:53:43 +05:30
Abhinav Raut d8b73c5877 retheme UI to the green palette and fix form and search bugs
Colors: the brand color moves from indigo to green in both themes, and the
sidebar, tooltip, card and link styles follow it. Three new tokens replace
hardcoded values: foreground-lighter for idle sidebar items, warning-600 for
warning text that needs 4.5:1 contrast on light backgrounds, and link for
anchors inside rendered email content. DESIGN_SYSTEM.md now lists the real
values from main.scss instead of the old indigo ones.

Forms: every button inside a form that is not the submit button now has an
explicit type. Without it the browser treats it as a submit button, so
clicking Cancel on a contact note posted an empty note, "New holiday" saved
the whole business-hours form, and pressing Enter in an SLA field deleted the
first alert row. The login page also highlights an empty password field on a
failed submit, which a broken condition prevented before, and the two
password fields on the set-password page get their own show and hide toggles.

Search: conversation and contact search now drop responses from an older
query, so clearing the box no longer repopulates the list with stale results.

Permissions: /api/v1/ai/summarize now needs messages:write, since it writes a
private note, and the menu item is hidden for agents without it.
2026-07-25 00:49:26 +05:30
Abhinav Raut 712fcbb642 return clear 400 errors for invalid AI tool and snippet input
An invalid custom tool name (bad characters or over 64 chars) used to
skip validation, hit the database check constraint, and return a 500.
The name format and length are now checked up front and return a 400
with the name hint, matching how the reserved-name check already works.
Bad tool URLs and parameter JSON now return their own specific message
instead of a generic "Something went wrong". Snippet create and update
now reject an empty title, like they already do for empty content.
Adds a unit test covering the tool validation cases.
2026-07-23 10:00:19 +05:30
Abhinav Raut 7c2e19b763 style sidebar section headers as labels and add design system doc 2026-07-23 03:52:05 +05:30