Viacheslav Klimov
054e41dd5f
Address PR review feedback
- AI credits limit increase request rolls back its dedupe key on any failure after it is stored, so a failed attempt no longer blocks retries (PR #16848 )
- DefaultAiChatServiceTest expects the credit check on createChat (PR #16848 )
- startNew uses the credit-checking process(action, user) overload and its test verifies it (PR #16848 )
- Unit tests for owner-scoped alarm subscriptions and TbEntityDataSubCtx.onSameEntities (PR #16848 )
5 days ago
Igor Kulikov
5529c43102
Merge remote-tracking branch 'origin/lts-4.4' into feature/ai-chat
1 week ago
Igor Kulikov
105d48b113
feat: V4_4_2_0Migration creates the AI credits limit increase request notification template when the system tenant has none, so installations patched within 4.4 (which never run updateDefaultNotificationConfigs) can send the request; 4.4.2.0 ships no SQL and is listed in SQL_LESS_ALLOWED
1 week ago
Igor Kulikov
5318a6d491
fix: a hand-over whose wait ended on uplinks the converter did not decode says so instead of 'nothing heard' and leaves out the nothing-arrived causes
1 week ago
Viacheslav Klimov
43adee4989
Merge pull request #16847 from thingsboard/fix/entity-group-test-duplicate-import-lts-4.4
Fixed test compilation: removed duplicate RandomStringUtils import in EntityGroupControllerTest (lts-4.4)
1 week ago
Igor Kulikov
6044477fcf
feat: AI chat connectivity fixes from live testing: the nothing-heard row offers the case's own paste chip that fills the composer and reads 'It is on now, keep waiting', its threshold capped at five minutes; a file the assistant wrote sits inside the hand-over step that uses it; a wait that started before its card shows after it; a reloaded turn keeps each tool's start time; record cards waiting for data re-check until the device is active; a gateway's arrival reads that it connected and JSON values stay out of readings; expanding a disclosure, a folded code block, unchanged review fields or a done card scrolls it clear of the composer; every message sends the browser's operating system in the client context; long answers wrap in the answered-questions card
1 week ago
Igor Kulikov
85a6b767ca
feat: AI hand-over card: Test from this computer first with the command in OS tabs and What you should see, Send a test value under the wait line, and a choice whose picked option rewrites the steps; fences can name a file or a tab (```bash tab=macOS), consecutive tabbed fences become one block with tabs in replies and cards, and a file block shows its name with Download
1 week ago
Igor Kulikov
d6dff03516
feat: AI hand-over card matches the kit: amber "Needs you" header with the title below and the turn's time, chat-size body text and code chips, values as dark copy lines, the wait line listening in amber with its clock and Stop, nothing heard with the agent's causes, and once data arrives the card folds to its header and the time it arrived while the wait line says what arrived with its readings; a wait started before the card in the same turn joins it; file blocks show their name and Download; review cards show a script or long JSON as a full code block and a change to one as a diff without copy or the ts key, type and integration type as a badge and a chip with TB's icons, and the integration type by name; action details show converter scripts, payloads and results as labelled code and JSON blocks, fetched pages framed and compact, and no bare id result; question Skip keeps the answers already given
1 week ago
Dmytro Skarzhynets
b2b269b3f1
Fixed test compilation: removed duplicate RandomStringUtils import in EntityGroupControllerTest
1 week ago
Igor Kulikov
0f9f75278f
test: drop the shaded duplicate RandomStringUtils import from EntityGroupControllerTest
1 week ago
Igor Kulikov
496cbd9502
Merge branch 'lts-4.4' into feature/ai-chat
1 week ago
Igor Kulikov
a59fe38042
fix: chat images fade in once loaded instead of showing an empty image first: record card pictures (dashboards, widgets, IoT Hub items), approval and action detail images, attachments and file previews, with the loading placeholder skipped; the record card's Open icon is centered in its button, and the card turns compact under a 420 px chat as in the design
1 week ago
Igor Kulikov
579249044e
fix: the password requirements tooltip opens only when the password policy sets a requirement, so an empty policy no longer shows an empty tooltip on focus, and the no-whitespace requirement shows when the policy disallows whitespace
1 week ago
Serhii Titenko
70eed8c3ca
Fixed help link on Login white labeling page ( #16844 )
The help button on White labeling > Login opened the General white labeling docs. Added the loginWhiteLabeling help link and bound tb-help to isLoginWl.
1 week ago
Vladyslav Prykhodko
bbc4b32a71
Improved swiping and keyboard and screen reader support in the IoT Hub screenshot and attribute widget carousels ( #16834 )
* Improved swiping and keyboard and screen reader support in the IoT Hub screenshot and attribute widget carousels
ngx-hm-carousel is unmaintained, needed a patch to run on Angular 20 and pulled in
hammerjs (globally imported only for it) and @nghedgehog/core . It is replaced with an
in-house carousel that keeps the library's selectors, inputs, content templates and
currentIndex and is exposed under the same 'ngx-hm-carousel' module id, so custom
widgets keep working.
Swipe and mouse drag use Pointer Events; the carousel is focusable and switches slides
with the arrow keys, slides are labelled and off-screen slides are inert. The prev/next
buttons of the attribute widget preview got accessible names.
* Fixed IoT Hub screenshot carousel autoplay staying paused and showing a focus ring after closing the full-screen viewer
- A mouse click no longer focuses the carousel (it stays focusable from the keyboard), so the
full-screen viewer does not return focus to it with a focus ring.
- Autoplay pauses on focus only when it is keyboard focus (:focus-visible); moving the
mouse out of the carousel resumes it.
- Prev/next areas and dots react only to the carousel's own elements, not to elements
with the same classes inside slides.
- Slide role, aria-roledescription and aria-label set by the slide author are kept.
- Pinch-zoom stays available on touch screens over the carousel.
- The slides container is looked up by [ngx-hm-carousel-container].
- Removed inputs and templates the new carousel ignores ([data], default [infinite] and
[show-num], #carousel, empty prev/next/dot templates) and the styles that hid them.
* Removed leftover IoT Hub carousel styles of the replaced library and tidied carousel comments
* Updated the license header of the modified IoT Hub item dialog template
1 week ago
Vladyslav Prykhodko
ce52cf5a34
Map widget: removed the built-in Google and HERE API keys and the Esri layers from the default map layers, added the Esri provider with an optional ArcGIS API key ( #16832 )
* UI: Map - load Esri reference layer styles from ArcGIS Online instead of bundling them
The styles are Esri content under the Esri Master License Agreement, which
prohibits redistributing or self-hosting it.
* UI: Map - retry a failed reference layer style load on the next map load and log the error
* UI: Map - remove Esri layers from the default map layers and the built-in Google and HERE API keys
* UI: Map - make the Google and HERE API keys optional with a warning, show the layers without a key without using ours
* UI: Map - add the Esri provider with an optional ArcGIS API key, use the key for the Esri reference layers and the ArcGIS vector basemap styles
* UI: Map - make the legacy Google and HERE API keys optional, show an accurate warning for a missing ArcGIS API key and add the Esri attribution to the raster Esri layers
* Update license headers of the modified map files
* UI: Map - drop the hidden reference layer API key, show the Esri attribution on the reference and legacy Esri layers and describe the missing API key warning to screen readers
1 week ago
Igor Kulikov
ff535b9c81
feat: ThingsBoard CLI guide's hero leads to Get started over a coding agent's window that plays three sessions on tabs (office-sensor, smart-retail, freezer-limits) under the ASCII wordmark and the thingsboard-cli 4.4.0.2.post1 banner, with a typed request, a numbered menu answer, Thinking then Done, tool runs and their results, turning after a 6 s hold that waits on hover, out of view or a hidden page and stops on a click or a key, still under reduced motion; How it works with the agent tiles, the commit over the tree and tb validate with the deploy menu; phase icons on squircles; Explore the docs with three links; Home's Use the CLI opens the guide with the chats folded and copies nothing; the chat's content follows Uplink: an entity chip on white with a hairline in one chip and key box, a chip that opens ends in a chevron, a card is one link with Open as a 36 px filled icon, the compact card and line in a narrow chat, a page's source on the record card's anatomy, a link that leaves the product ends in a north-east arrow, every Copy turns into a check for 1.5 s and is announced, tables in a hairline box with entity chips and a sticky first column when docked, one keyboard key rule with its quiet form; the hand-over card and the out-of-limit card in the chat
1 week ago
Viacheslav Klimov
3fce1a4766
Merge branch 'rc'
1 week ago
Vladyslav Prykhodko
20528f3e42
Improved loading speed of code editors and fixed shifted or failing dashboard image screenshots ( #16813 )
* UI: Load Ace modes, snippets and themes on demand
The first editor used to load all 14 modes, 11 snippet files and 2 themes
up front (901 KB, 29 requests). Ace now loads only what an editor uses
through config.setModuleLoader; a JSON editor loads 534 KB in 5 requests.
- Once a module is defined, its loader is removed, so Ace resolves it
synchronously again, as before.
- getAce() accepts modules to preload for editors that read the session
mode synchronously after setMode; js-func preloads javascript and tbel.
- mode-c_cpp and snippets/protobuf are no longer loaded: no editor uses
the C/C++ mode, mode-protobuf bundles its own copy, and the protobuf
mode takes its snippets from snippets/c_cpp.
* UI: Load the SystemJS modules map lazily and cut eager imports of home code
- The SystemJS modules map, which imports most of the application, now
loads only when a widget or rule node loads an extension module. Pages
and dashboards no longer carry it.
- WidgetService, DashboardUtilsService and HomeService no longer import
the widget config component, the dashboard component models and the
router tabs component, which kept them in the login bundle:
the basic config base class is passed to
registerBasicWidgetConfigComponents, the gridster limits moved to
shared dashboard models (re-exported from the old place), and router
tabs are detected by a flag instead of instanceof.
- BlobEntitiesComponent reads the header actions panel from the widget
context instead of injecting WidgetComponent. That import closed the
only NgModule import cycle (SharedHomeComponentsModule ->
WidgetComponentsModule), which crashed startup with "Cannot read
properties of undefined (reading 'ngModule')" when the module init
order changed.
* UI: Take dashboard screenshots with modern-screenshot, loaded on demand
The dashboard image dialog used html2canvas, which is no longer
maintained. It shifted and cropped the captured area and failed on
dashboards that use the CSS color() function (charts, gauges, maps).
- modern-screenshot (MIT, no dependencies, 10 KB gzip instead of 44 KB)
renders the dashboard through the browser itself, so the thumbnail
matches the page. It loads only when a screenshot is taken.
- The whole dashboard is captured and the selected area is cut out of
the canvas; the development notice is still stamped before the image
is serialised.
- Elements marked with data-html2canvas-ignore are still left out, and
videos with no source are skipped, since the capture would wait for
them forever.
* UI: Import entity type models directly in entity chips instead of the shared public API barrel
The barrel re-exports report-component.models, which imports the time series
chart models and with them echarts and zrender. Any eager import path to
entity chips would pull ~1.7 MB of chart code into the startup bundle, as
happened in PE through the AI audit log dialog.
1 week ago
Igor Kulikov
b4549d5b15
feat: the AI assistant's chats panel folds and unfolds with the side menu's motion: its width eases between the panel and the strip as they cross-fade, and on phones it slides in and out as a drawer; the page behind an open panel dims in
1 week ago
Igor Kulikov
50101921df
feat: ThingsBoard CLI page leads with the setup prompt: Ask your agent comes first and is the default, the other way is Install it yourself, and Home's Use the CLI copies the setup prompt with its Copied state on arrival; the install way's last step names Claude Code and Antigravity, says which to pick when both are installed and gives the command to come back on a tab each; the example picks say what the person sets out to do; the folded prompt in the hero fades over six eased stops
1 week ago
Igor Kulikov
17605c20e6
feat: ThingsBoard CLI page in the AI assistant: a dark hero with the install command for macOS or Linux and Windows or a setup prompt for the agent, How it works, step-by-step setup in a terminal or through the agent with this server's URL and API keys, example prompts for a sensor, a solution and a change, deploy and demo data, connecting a device and links to the CLI docs; opened from the chats panel foot row (again for Get started), the folded strip, a Try CLI now banner on Get started and a Use the CLI card on Home that copies the install command and lands with Copied shown; code blocks gain tab groups that stay in step, per-tab language and a labelled Copy
1 week ago
Artem Murenko
3033215a7c
chore: change issue assignee from Ultrazombie to mykhailokornieiev
8 months ago
Igor Kulikov
14f93cc25e
feat: running out of AI credits shows a card in the chat and the solution chat with the tenant's usage or the installation's pool, and a request for more credits that notifies the system administrators by web and email (Set new limit or Add credits, once a month per tenant and limit); the tenant limit comes as its own 429 error, also when a chat is created or a solution started, and a chat or solution made for a first prompt that runs out of credits is removed with the prompt kept; the chat stays at its end when the card appears; new AI credits limit increase request notification type with its default template
1 week ago
Igor Kulikov
d051332798
feat: the alarms table shows each severity with its mark and name, as Home's Alarms card does
1 week ago
Igor Kulikov
35afaf7554
feat: Home's Waiting for you pills show how long each chat has waited, from the chat's last activity, with what it waits for and the time in the tooltip, refreshed every minute; chat statuses carry the updated time into the loaded chats
1 week ago
Igor Kulikov
6a4f637769
fix: Home without layout shifts while it loads: IoT Hub shows skeleton tiles the size of its templates and devices, renders the last listing kept for a day at once and refreshes it in the background, and fades its images in; Waiting for you and Get started with AI keep their space with skeletons when they were shown last time, as the chats service now tells when the first chat statuses arrived
1 week ago
Igor Kulikov
23aea1adaa
feat: Home follows the user's permissions: cards shown only where the user may read what they show (alarms, dashboards and devices including shared groups, API usage, usage info, mobile app settings, IoT Hub with full access), Get started only when every step can be done; alarm acknowledge, assign and clear only with alarm write, Add rule as on the alarm rules page, links to entities only where their pages open; Add device and Add dashboard and the setup empty states by create permission for tenant and customer users alike, View all to shared groups when only those are readable; status line badges counted only where readable; side cards fill the main column when it has none; quick links' row lines complete when the last row is short
1 week ago
Igor Kulikov
6be09a4b51
refactor: the new Home replaces the built-in home dashboards: the home dashboard resolver returns only an assigned dashboard (tenant, customer, user or menu), the system administrator, tenant administrator and customer user home dashboard JSONs are removed with the selector and the system dashboard flag that only they used; the home page widgets stay for dashboards that still use them
1 week ago
Igor Kulikov
f1e3dcfdce
feat: the system administrator Home License card: the plan band (subscription, perpetual, Community Grant, Development) with the next charge or support date, Manage license and the license info refreshed from the header; devices and assets, installations (production instances, edges, remote agents) and AI credits as on License management, amber near the limit and red at it, with the row's add or upgrade action; add-ons as License management decides them, the Professional Pack offer on a Community Grant and Go to production on Development; the license purchase and upgrade actions and the hand-off dialog shared with License management; Install's features listed as pending while they load
1 week ago
Igor Kulikov
e043829420
fix: Home renders its cards only while signed in, so a card shown again by the cleared settings on logout no longer subscribes after the websocket reset and leaves the next user's cards empty; AI chat statuses are polled only where AI is available
1 week ago
Igor Kulikov
74138ac3e6
feat: the system administrator Home System card: single node CPU, RAM and disk tiles with the last hour's chart, a cluster's services table sortable with show more and scrolling, the worst load as a callout, the installed version with the hidden update brought back; the Home charts' tooltips in the design's dark readout for System and Activity
1 week ago
Igor Kulikov
2322c1071f
feat: the system administrator Home with Customize Home: the status line's system pills (CPU, RAM or disk load, license limits near 85%, no tenants, features not configured) with its space reserved while it loads; the product release card when an update is available, hidden for the visit with Undo; Get started's seven steps done from the tenant count and the features info, optional steps skipped in the getting started settings, closed through the home cards settings; Install's live entity counts and configured features; Activity with messages alone; Quick links with the documentation defaults; System and License as frames; features info fetched once for the page; the AI panel only where AI is available; the home dashboard resolver without the system administrator dashboard
1 week ago
Igor Kulikov
86e14ccccf
feat: Customize Home on the customer user Home: its cards follow the user's home cards settings, the footer brings hidden cards back and opens Customize Home, and Quick links can be hidden again
1 week ago
Igor Kulikov
f6796214eb
feat: the customer user Home: the greeting and status line, Alarms, Dashboards and Devices in the main column, Notifications and Quick links beside them, without the AI Assistant, Customize Home or Hide (Quick links takes a hideable input)
1 week ago
Igor Kulikov
756976f38c
fix: Home Quick links without links shows its empty note across the card's width; the two columns apply only to configured links
1 week ago
Igor Kulikov
dab8ec628f
feat: the Home Mobile app card on the old mobile app QR code widget's settings: the deep link's QR code refreshed at its ttl, the store badges and the label as the merged settings place them, and the card left out of Home while the QR code is not set to show on the home page
1 week ago
Igor Kulikov
20569061a9
feat: the Home Usage card: entities with their limits from the old usage info widget's API, API calls live from the API usage state as the API usage dashboard reads them, AI credits among them when AI is available, rows turning red at 90% of a limit, both lists side by side on a wide card, and the card left out of Home for a user who cannot read usage
1 week ago
Igor Kulikov
f2e25aeee6
refactor: the Home page module is home-page: the home-links folder and module renamed, the new Home's components, pages and models moved up out of its home subfolder, and the routed home component merged with the new Home's page component (a home dashboard when one is set, the new Home otherwise)
1 week ago
Igor Kulikov
1f6b02054c
feat: the Home Quick links card on the old quick links widget's user settings: pages and web links in one ordered list (web links kept in QuickLinks.webLinks under url: ids the old widget skips), two columns with lines between rows when every label fits, an edit mode to drag, edit, remove, add and reset to the defaults, and an Add quick link dialog that searches the menu as Go to does or takes a checked web address with a name and an icon from the full Material and MDI set
1 week ago
Igor Kulikov
f3e5f5250d
feat: the Home Notifications card on the notification bell's live unread subscription: the unread count, rows that open in place with the exact time and the template's action, mark as read and mark all as read, alarm notifications marked by severity, five rows with show more and the inbox link, and no unread notifications as its all clear state
1 week ago
Igor Kulikov
42bc8f1b3a
feat: the Home Get started card on the getting started user settings the old widget keeps: six steps with the open one's sentence, guide, command and page, ticked by its mark or Done (the steps before the furthest done count as done, the open step is the last selected), All done with Start over and Undo, Hide; the AI chat's code block styles are shared so the card's commands use the same terminal block
2 weeks ago
Igor Kulikov
3523f3321a
feat: the Home Activity card: active devices and messages over the last 30 days as the design's lines, with its scale, grid lines, weekly dates and today's value, the old widget's tooltip, kept live from the API usage counters so a new tenant's No activity yet turns into the charts; Get started with AI for a tenant with no chat, solution or device, its cards opening Get started and New solution with the composer focused; the Alarms card says when there are no alarm rules or no devices yet; built cards fit their content and card titles take the design's gaps. Fixes: chats, solutions and the docked chat start clean for the next user after a logout, and leaving Home while Ask from Home is open no longer breaks navigation
2 weeks ago
Igor Kulikov
9618b5b1e3
feat: the Home Devices card: the count of all devices and the Inactive and Active tiles from entity counts; the list from entity data subscriptions on the device state keys (attributes or time series, as the platform keeps them), inactive first with the most recently silent on top, then the devices that never connected, then the active, reversible and sortable by name; a device opens its details page and View all and Add device keep their filter and action. The Home cards share their tiles, table, empty state and Add button styles. A dynamic entity data subscription now also sends the entity fields that changed (a renamed device) when its entities stay the same
2 weeks ago
Igor Kulikov
262de60668
feat: the Home Dashboards card on the recent dashboards widget's APIs: Last viewed lists the recently viewed dashboards first and then the rest, newest first, under the count of all dashboards; Starred with its star picker that suggests recent dashboards and searches all of them; star and unstar in the rows, Show more, View all and Add dashboard; empty states for a tenant and a customer user. The Home lists share their toggle, footer, row rule and short times (the Alarms card uses them too). A user keeps up to 50 visited and 50 starred dashboards (was 10)
2 weeks ago
Igor Kulikov
d916500a1c
feat: Add alarm rule on the Home Alarms card opens Alarm rules with the new alarm rule dialog (action=add, as the other tables take it)
2 weeks ago
Igor Kulikov
5ffcb8aaaf
perf: an alarm page without an entity filter sorts only alarm ids and then reads the page's rows from alarm_info, so the view's originator and assignee lookups and the alarm details no longer go through the sort of every active alarm (by severity: 94 to 22 ms with 20k active alarms, 220 to 69 ms with 300k)
2 weeks ago
Igor Kulikov
f79fa65765
feat: the Home Alarms card: the title's count, the severity tiles and All | Mine live from alarm counts; the table from an alarm data subscription whose page size, severity, assignee and sort follow Show more, the tiles, Mine and the headings; acknowledge, assign to me, details and clear in the row and its compact menu; All clear with View cleared; View all opens Alarms with the card's severity and Mine; the card fits its table. An alarm data query without an entity filter now lists every alarm the user may see (the tenant's, or the customer's), refreshed on the dynamic page link interval and sent only when changed, counted on the alarm table itself; a zero time window means no time limit
2 weeks ago
Igor Kulikov
9c89811ff8
Merge pull request #16833 from thingsboard/labels-review
AI Assistant introduction: copy review of What's new, the tour and the AI button's popup
2 weeks ago
Igor Kulikov
ef6242c3d0
feat: Home offers Ask from Home once, after the welcome: a small hint on the composer with the AI spark, one line, / to ask and Ask, which puts the cursor in the composer; Ask, close and Esc each mark it seen; tour popups sit 14px from their target and their buttons fit their label, as the design's do
2 weeks ago