toga-ai 1.0.460 → 1.0.461
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/knowledge/1.0/apps/library/INDEX.md +1 -1
- package/knowledge/1.0/apps/library/features/diagnostic-dialog-view-recommended-services.md +80 -21
- package/knowledge/clients/office-depot/INDEX.md +1 -1
- package/knowledge/clients/office-depot/features/togarefresh2026-linkbuilder-routing.md +15 -4
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
| [Library (1.0 Framework) Architecture](architecture.md) | `library` is the shared library repository for **all 1.0 (legacy) applications** — the `App_` framework. | library/_.php, library/app/, library/browser/ |
|
|
6
6
|
| [App_Sso — Reusable 1.0 SSO Initiation (SP-initiated SAML via saml.togahub.com)](features/app-sso-initiation.md) | `App_Sso` (`library/app/sso.php`) is the **1.0 port of the 2.0 SAML gateway's SP-initiated SSO initiation**, packaged as a reusable, framework-level capability | library/app/sso.php, library/sso/togahub_private_key.key |
|
|
7
7
|
| [Cron Execution Monitoring (App_Framework check-in/out → CronJobExecutions)](features/cron-execution-monitoring.md) | `App_Framework::cronInitialization()` / `App_Framework::cronFinished()` (in `library/app/framework.php`) give every 1.0 (`App_`) cron job a check-in/check-out l | library/app/framework.php |
|
|
8
|
-
| [Diagnostic Dialog — View Recommended Services Routing](features/diagnostic-dialog-view-recommended-services.md) |
|
|
8
|
+
| [Diagnostic Dialog — View Recommended Services Routing](features/diagnostic-dialog-view-recommended-services.md) | Two "View Recommended Services" buttons exist in the TOGa Refresh 2026 SR view: 1. | library/app/model/toga/diagnostic.php, library/app/model/servicerequest.php |
|
|
9
9
|
| [Elite Freshservice Sync (library)](features/elite-freshservice-sync.md) | `App_Api_Toga2` in `library/app/api/toga2.php` orchestrates bidirectional sync between TOGA 2 and TOGaDesk. | library/app/api/toga2.php |
|
|
10
10
|
| [Branded HTML Email Templates (App_Email_Template)](features/email-templates.md) | `App_Email_Template` (`app/email/template.php`) is the base class for branded HTML emails in the 1.0 (`App_`) framework. | library/app/email/template.php, library/app/email/agilant.php |
|
|
11
11
|
| [1.0 MVC Page Pattern & New-App Skeleton](features/mvc-page-pattern-and-app-skeleton.md) | This is the **reusable recipe for standing up a new 1.0 (`App_`) application** and for adding pages to one — the folder-based MVC routing, the page lifecycle, t | library/app/framework.php, library/app/frameworkindex.php, library/app/mvc.php, library/app/database.php, library/app/model.php, library/app/config.php |
|
|
@@ -6,44 +6,103 @@ project: Library
|
|
|
6
6
|
client: shared
|
|
7
7
|
type: feature
|
|
8
8
|
status: active
|
|
9
|
-
updated: 2026-
|
|
9
|
+
updated: 2026-07-28
|
|
10
10
|
owners: [snaredla]
|
|
11
11
|
files:
|
|
12
12
|
- library/app/model/toga/diagnostic.php
|
|
13
|
+
- library/app/model/servicerequest.php
|
|
13
14
|
related:
|
|
14
15
|
- ../../../clients/office-depot/features/togarefresh2026-linkbuilder-routing.md
|
|
15
16
|
---
|
|
16
17
|
|
|
17
18
|
## Summary
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
the
|
|
19
|
+
Two "View Recommended Services" buttons exist in the TOGa Refresh 2026 SR view:
|
|
20
|
+
1. **Static button** — rendered on page load inside `view.php`, always visible when a
|
|
21
|
+
diagnostic has been completed on the SR.
|
|
22
|
+
2. **Device dialog button** — inside the device click modal (`dialogDevice`), shown only
|
|
23
|
+
when that device has a completed diagnostic.
|
|
24
|
+
|
|
25
|
+
Both buttons route to either `serviceselection` (repair + subscription) or `techsupport`,
|
|
26
|
+
based on `resultCode` of the latest completed diagnostic. The routing logic is
|
|
27
|
+
**per-device** — each device's latest result is evaluated independently.
|
|
28
|
+
|
|
29
|
+
## Key files / entry points
|
|
30
|
+
- `library/app/model/toga/diagnostic.php` — `initializeDiagnosticDialog()`: renders
|
|
31
|
+
`dialogDevice` dialog; device dialog button uses a JS global `_deviceBuilderUrl` set
|
|
32
|
+
dynamically per device click.
|
|
33
|
+
- `library/app/model/servicerequest.php` — `ajaxLoadDeviceDialog($deviceId,
|
|
34
|
+
$serviceRequestId)`: computes per-device routing and returns `builderUrl` in the AJAX
|
|
35
|
+
response.
|
|
36
|
+
- `toga/app/togarefresh2026/servicerequests/view.php` — static button routing block
|
|
37
|
+
(search for `LatestPerDevice`).
|
|
22
38
|
|
|
23
39
|
## How it works
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
40
|
+
|
|
41
|
+
### Static button (view.php)
|
|
42
|
+
Runs at page load. Queries the latest completed diagnostic **per device** on the SR using
|
|
43
|
+
a `MAX(id) GROUP BY deviceId` subquery. If **any** device's latest result is a
|
|
44
|
+
software/virus problem code → routes to repair + subscription. Otherwise → tech support.
|
|
45
|
+
|
|
46
|
+
SQL filter: `serviceRequestId = X AND status = 'COMPLETED' AND pass > 0`
|
|
47
|
+
|
|
48
|
+
### Device dialog button (diagnostic.php + ajaxLoadDeviceDialog)
|
|
49
|
+
`initializeDiagnosticDialog` pre-renders the button with `window.location.href =
|
|
50
|
+
_deviceBuilderUrl`. When the user clicks a device, `loadDeviceDialog(deviceId)` fires
|
|
51
|
+
an AJAX call passing both `deviceId` and `serviceRequestId`. `ajaxLoadDeviceDialog`
|
|
52
|
+
queries the latest diagnostic for **that specific device** on **that specific SR**
|
|
53
|
+
(`deviceId + serviceRequestId + status='COMPLETED' + pass>0 ORDER BY id DESC LIMIT 1`),
|
|
54
|
+
checks `resultCode`, and returns `builderUrl` in the response. The JS
|
|
55
|
+
`loadDeviceDialogResponse` sets `_deviceBuilderUrl = resp['builderUrl']`.
|
|
56
|
+
|
|
57
|
+
## Result codes that trigger repair routing
|
|
58
|
+
|
|
59
|
+
### BITSTORM exact-match codes
|
|
60
|
+
```
|
|
61
|
+
'Has A/V, Software problem(s) found.'
|
|
62
|
+
'No A/V, Software problem(s) found.'
|
|
63
|
+
'No A/V, Quarantined item(s) found.'
|
|
64
|
+
'Has A/V, Quarantined item(s) found.'
|
|
65
|
+
'No A/V, Quarantined item(s) found, PUPS found.'
|
|
66
|
+
'Has A/V, Quarantined item(s) found, PUPS found.'
|
|
67
|
+
'Has A/V, PUP(s) found.'
|
|
68
|
+
'No A/V, PUP(s) found.'
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### STARTECH dynamic patterns (strpos)
|
|
72
|
+
- `'antivirus and firewall status failed'` — number of registry entries varies
|
|
73
|
+
- `'potentially unwanted programs'` — number varies
|
|
32
74
|
|
|
33
75
|
## Data model
|
|
34
76
|
- Table: `Diagnostics` (db_toga)
|
|
35
|
-
-
|
|
36
|
-
|
|
77
|
+
- Fields read: `resultCode` (VARCHAR), `deviceId` (INT), `serviceRequestId` (INT),
|
|
78
|
+
`status` (VARCHAR = 'COMPLETED'), `pass` (TINYINT > 0)
|
|
37
79
|
|
|
38
80
|
## Gotchas / known issues
|
|
39
|
-
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
-
|
|
43
|
-
|
|
81
|
+
- **`pass=1` does NOT mean "no problems found"** — it means the scan ran successfully.
|
|
82
|
+
"No A/V, Software problem(s) found." has `pass=1`. Never use `pass` alone for routing;
|
|
83
|
+
always check `resultCode`.
|
|
84
|
+
- **Multi-device SRs**: if a second device is scanned clean after a first device showed
|
|
85
|
+
problems, a naive `ORDER BY id DESC LIMIT 1` across all devices picks the clean result
|
|
86
|
+
and hides repair. The static button uses `MAX(id) GROUP BY deviceId` (LatestPerDevice
|
|
87
|
+
subquery); the dialog button filters by `deviceId + serviceRequestId` directly.
|
|
88
|
+
- **`_deviceBuilderUrl` is a page-global JS var** — set fresh each time a device dialog
|
|
89
|
+
opens. If the dialog is opened, closed, and a different device opened, the var is
|
|
90
|
+
overwritten correctly.
|
|
91
|
+
- `$serviceRequestId` is cast to `(int)` in both PHP callers before SQL interpolation —
|
|
92
|
+
do not remove this cast.
|
|
93
|
+
- `isTogaRefresh2023` is kept alongside `isTogaRefresh2026` in the session check — do not
|
|
94
|
+
remove it.
|
|
95
|
+
- The same `$softwareVirusResultCodes` array and `strpos` checks appear in three places
|
|
96
|
+
(view.php, diagnostic.php, servicerequest.php) — keep all three in sync when adding new
|
|
97
|
+
result codes.
|
|
44
98
|
|
|
45
99
|
## Related docs
|
|
46
100
|
- `clients/office-depot/features/togarefresh2026-linkbuilder-routing.md`
|
|
47
101
|
|
|
48
102
|
## Change history
|
|
49
|
-
- 2026-
|
|
103
|
+
- 2026-07-28 — Replaced pass-based routing with resultCode-based per-device routing.
|
|
104
|
+
Static button uses LatestPerDevice subquery; device dialog button is now dynamic via
|
|
105
|
+
_deviceBuilderUrl JS global. ajaxLoadDeviceDialog now accepts serviceRequestId and
|
|
106
|
+
returns builderUrl. (snaredla)
|
|
107
|
+
- 2026-06-23 — Initial doc. Diagnostic modal routes pass→techsupport,
|
|
108
|
+
fail→serviceselection with showServices=195,101899. (snaredla)
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
| Doc | Framework | Summary | Files |
|
|
4
4
|
|-----|-----------|---------|-------|
|
|
5
5
|
| [ODP Tech Support Agent (Office Depot variant)](features/odp-tech-support.md) | 2.0 | ODP-specific customization of the shared TOGa Voice agent. | voice-to-voice/clients/odp/agent.py, voice-to-voice/clients/odp/agents/tech_support.py, voice-to-voice/clients/odp/prompts.py, voice-to-voice/clients/odp/config.yaml, voice-to-voice/clients/odp/.env.example |
|
|
6
|
-
| [TOGaRefresh 2026 — linkBuilderRefresh URL Routing (ODP)](features/togarefresh2026-linkbuilder-routing.md) | 1.0 | In the TOGaRefresh 2026 UI, any button that navigates to the service builder must use `App_Model_ServiceRequest::linkBuilderRefresh()` (→ `togarefresh2026_servi | toga/app/togarefresh2026/servicerequests/review.php, toga/app/togarefresh2026/customers/view.php, library/app/model/toga/diagnostic.php |
|
|
6
|
+
| [TOGaRefresh 2026 — linkBuilderRefresh URL Routing (ODP)](features/togarefresh2026-linkbuilder-routing.md) | 1.0 | In the TOGaRefresh 2026 UI, any button that navigates to the service builder must use `App_Model_ServiceRequest::linkBuilderRefresh()` (→ `togarefresh2026_servi | toga/app/togarefresh2026/servicerequests/review.php, toga/app/togarefresh2026/customers/view.php, toga/app/togarefresh2026/servicerequests/view.php, library/app/model/toga/diagnostic.php |
|
|
7
7
|
| [Office Depot](profile.md) | 2.0 | Office Depot is the first deployed tenant of the **TOGa Voice** (`voice-to-voice`) platform. | |
|
|
@@ -6,11 +6,12 @@ project: TOGa
|
|
|
6
6
|
client: office-depot
|
|
7
7
|
type: client-feature
|
|
8
8
|
status: active
|
|
9
|
-
updated: 2026-
|
|
9
|
+
updated: 2026-07-28
|
|
10
10
|
owners: [snaredla]
|
|
11
11
|
files:
|
|
12
12
|
- toga/app/togarefresh2026/servicerequests/review.php
|
|
13
13
|
- toga/app/togarefresh2026/customers/view.php
|
|
14
|
+
- toga/app/togarefresh2026/servicerequests/view.php
|
|
14
15
|
- library/app/model/toga/diagnostic.php
|
|
15
16
|
related:
|
|
16
17
|
- ../profile.md
|
|
@@ -22,6 +23,11 @@ In the TOGaRefresh 2026 UI, any button that navigates to the service builder mus
|
|
|
22
23
|
`App_Model_ServiceRequest::linkBuilderRefresh()` (→ `togarefresh2026_servicerequests_serviceselection`)
|
|
23
24
|
instead of the legacy `linkBuilder()` (→ `servicerequests_builder`).
|
|
24
25
|
|
|
26
|
+
The "View Recommended Services" button has two placements in the SR view: a static page-load
|
|
27
|
+
button and a per-device dialog button. Both route to either `serviceselection` (repair +
|
|
28
|
+
subscription) or `techsupport` based on the device's latest diagnostic `resultCode`.
|
|
29
|
+
See the library doc for full routing details.
|
|
30
|
+
|
|
25
31
|
## Key files / entry points
|
|
26
32
|
- `App_Model_ServiceRequest::BUILDER` = `'servicerequests_builder'` (legacy)
|
|
27
33
|
- `App_Model_ServiceRequest::BUILDERREFRESH` = `'togarefresh2026_servicerequests_serviceselection&jobJacketId=1'`
|
|
@@ -34,16 +40,21 @@ Files updated to use `linkBuilderRefresh`:
|
|
|
34
40
|
|------|----------|---------|
|
|
35
41
|
| `togarefresh2026/servicerequests/review.php` | line 217 | Quote submission POST URL for non-EXISTING job jackets |
|
|
36
42
|
| `togarefresh2026/customers/view.php` | line 64 | "Create Work Order For This Customer" button |
|
|
37
|
-
| `
|
|
43
|
+
| `togarefresh2026/servicerequests/view.php` | `LatestPerDevice` block | Static "View Recommended Services" button — resultCode-based per-device routing |
|
|
44
|
+
| `library/app/model/toga/diagnostic.php` | `initializeDiagnosticDialog()` | Device modal button — dynamic URL via `_deviceBuilderUrl` JS global |
|
|
38
45
|
|
|
39
46
|
## Gotchas / known issues
|
|
40
47
|
- The old `servicerequests/view.php` (legacy non-refresh view) intentionally keeps `linkBuilder()` — 2026 stores do not route through it.
|
|
41
48
|
- Do not change `App_Model_ServiceRequest::BUILDER` — legacy stores still depend on it.
|
|
42
|
-
- The
|
|
43
|
-
-
|
|
49
|
+
- The static button (view.php) uses a `MAX(id) GROUP BY deviceId` LatestPerDevice subquery — any device with a current problem code triggers repair for the whole SR.
|
|
50
|
+
- The device dialog button routes per-device: only the clicked device's latest result determines the URL.
|
|
51
|
+
- Routing uses `resultCode` (not `pass`) — `pass=1` appears on both problem and clean results for BITSTORM. See the library doc for full result code list.
|
|
52
|
+
- `toga` app repo was not in registry.json before 2026-06-23 — it has been added (framework 1.0, role app, dependsOn library).
|
|
44
53
|
|
|
45
54
|
## Related docs
|
|
46
55
|
- `1.0/apps/library/features/diagnostic-dialog-view-recommended-services.md`
|
|
47
56
|
|
|
48
57
|
## Change history
|
|
58
|
+
- 2026-07-28 — Added view.php to files list. Updated routing description from pass-based
|
|
59
|
+
to resultCode-based per-device. Two-button architecture documented. (snaredla)
|
|
49
60
|
- 2026-06-23 — Initial doc. All 2026 builder buttons now use linkBuilderRefresh; diagnostic modal uses pass/fail routing. toga added to registry.json. (snaredla)
|
package/package.json
CHANGED