Features Documentation - v2.0

๐ŸŽจ User Interface Components

1. Searchable Combobox Component

Component: jtSearchableCombobox

Purpose: Generic, reusable dropdown with real-time filtering

Features:

Usage Example:

<c-jt-searchable-combobox
  label="Select Configuration"
  placeholder="Type to search..."
  options="{configOptions}"
  required
  onselect="{handleSelect}"
  onclear="{handleClear}"
></c-jt-searchable-combobox>

API Properties: | Property | Type | Description | |โ€”โ€”โ€”-|โ€”โ€”|โ€”โ€”โ€”โ€”-| | label | String | Display label | | placeholder | String | Input placeholder text | | options | Array | [{value, label}] | | required | Boolean | Validation flag | | disabled | Boolean | Disabled state | | noResultsText | String | Message when no results | | errorText | String | Validation error message |

Events: | Event | Payload | Description | |โ€”โ€”-|โ€”โ€”โ€”|โ€”โ€”โ€”โ€”-| | select | {value, label, data} | Option selected | | clear | none | Selection cleared |


2. Dynamic Parameter Inputs

Component: jtParameterInputs

Purpose: Auto-generate input fields from SOQL bind variables

Features:

Auto-Detection:

-- SOQL Query:
SELECT Id, Name FROM Account WHERE Type = :accountType AND Industry = :industry

-- Auto-Generated Inputs:
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ accountType: [____________]  โ„น๏ธ          โ”‚
โ”‚ industry:    [____________]  โ„น๏ธ          โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Tooltip Example:

โ„น๏ธ accountType
Used in query: WHERE Type = :accountType

3. Query Results Viewer

Component: jtQueryResults

Purpose: Advanced results display with multiple view modes

View Modes:

Table View (Default)

JSON View

{
  "metadata": {
    "query": "SELECT Id, Name FROM Account...",
    "count": 5,
    "executedAt": "2025-11-30T10:30:00Z"
  },
  "records": [...]
}

CSV View

Mobile View (Auto-responsive)

Toggle Buttons:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ [Table] [JSON] [CSV]   ๐Ÿ“ฅ Export    โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ ... results ...                     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ” Advanced Features

Purpose: Find all references to a query configuration in code

Search Scope:

Apex Classes (No API consumption)

Flows (Tooling API - 1-5 API calls)

Resilient Architecture:

Example Output:

โœ“ Apex Search: Complete
โœ“ Flow Search: Complete

Found 3 references:

Type        | Name                    | Line
------------|-------------------------|------
Apex Class  | AccountController       | 45
Apex Class  | OpportunityService      | 128
Flow        | Account_Update_Flow     | N/A

Error Handling:

โœ“ Apex Search: Complete
โš ๏ธ Flow Search: Failed
Error: Tooling API not accessible

Found 2 references (Apex only):
...

Performance Optimizations:


5. Run As User (Advanced Testing)

Purpose: Test queries in another userโ€™s permission context

Modes:

Standard Execution

System.runAs() Mode (Test Context)

User Selection:

Security Note:

โš ๏ธ Note: This validates user permissions but executes
with USER_MODE security. Results reflect sharing rules
and field-level security.

6. Metadata Creation UI

Purpose: Create/edit query configurations without code

Features:

Real-Time Validation

Auto-Detection

Query Preview

Environment Awareness

Fields: | Field | Required | Auto-Generated | Editable | |โ€”โ€”-|โ€”โ€”โ€”-|โ€”โ€”โ€”โ€”โ€”-|โ€”โ€”โ€”-| | Label | โœ… Yes | No | โœ… Yes | | Developer Name | โœ… Yes | Yes (from label) | โœ… Yes | | Base Query | โœ… Yes | No | โœ… Yes | | Object Name | โœ… Yes | Yes (from query) | โŒ No (read-only) | | Bindings (JSON) | No | No | โœ… Yes |

Example Workflow:

  1. Click + Create Configuration
  2. Enter label: "Active Opportunities"
  3. Developer name auto-fills: Active_Opportunities
  4. Enter query:
    SELECT Id, Name, Amount FROM Opportunity
    WHERE StageName = 'Closed Won'
    
  5. Object name auto-detects: Opportunity (read-only)
  6. (Optional) Add bindings JSON:
    { "stageName": "Prospecting" }
    
  7. Preview shows formatted query
  8. Click Save โ†’ Deploys via Tooling API (2-3 API calls)
  9. Configuration list auto-refreshes

๐ŸŒ Internationalization (i18n)

Supported Languages (v2.0)

Language Code Status
English en โœ… Complete
Spanish es โœ… Complete
French fr โœ… Complete
German de โœ… Complete
Italian it โœ… Complete
Japanese ja โœ… Complete
Portuguese (BR) pt_BR โœ… Complete
Chinese (Simplified) zh_CN โœ… Complete

Translation Strategy

JavaScript Labels (labels.js):

Custom Labels (Future):

Object Translations:


๐Ÿ”’ Security & Compliance

Tooling API Authentication (v2.0)

Architecture:

  1. โœ… Visualforce Page-based: Uses JT_SessionIdPage to obtain API-enabled session ID
  2. โœ… Multi-level Caching: Static variable (transaction) + Platform Cache (cross-request)
  3. โœ… Zero Configuration: Works out-of-the-box after installation
  4. โœ… Production Optimized: Minimizes callouts with intelligent caching
  5. โœ… Secure: Session IDs are user-specific and expire automatically

Why Visualforce Page Instead of Named Credentials?

Setup Required:

โœ… None! The application works automatically after installation.

Optional: Configure Platform Cache for optimal performance (see Tooling API Setup Guide)

See: TOOLING_API_OAUTH_SETUP.md for complete architecture details

API Consumption Monitoring

Features That Consume API Calls:

Feature API Calls Optimizations
โ€œWhere is this used?โ€ (Apex) 0 Direct SOQL (no callouts)
โ€œWhere is this used?โ€ (Flows) 1-2 โœ… Cached session ID + smart filtering
Create Configuration 1-2 โœ… Cached session ID
Edit Configuration 1-2 โœ… Cached session ID

Note: With caching optimizations, session ID retrieval is reduced from N callouts to 1 callout per transaction.

Daily Limits:

Audit Logging:


โ™ฟ Accessibility (WCAG 2.1 AA)

Compliance Features

Keyboard Navigation:

Screen Reader Support:

Visual Accessibility:

Component-Specific:

Component Accessibility Features
jtSearchableCombobox ARIA combobox pattern, keyboard nav, screen reader announcements
jtQueryResults Table headers, row/column associations, expand/collapse announcements
jtConfigModal Modal focus trap, ESC key close, required field validation
jtExecuteButton Loading state announced, disabled state communicated

๐Ÿ“Š Performance Optimizations (v2.0)

Client-Side Filtering

Problem (v1.0): Server callout for every keystroke in search

Solution (v2.0): Filter options in browser

Impact:

Component-Based Rendering

Problem (v1.0): Full page re-render on any state change

Solution (v2.0): Granular component updates

Impact:

Functional Programming Benefits

Pure Functions = Memoization

// Can safely memoize this - same input always gives same output
const transformToCSV = memoize((records) => {
  return records.map((r) => Object.values(r).join(",")).join("\n");
});

Benefits:


๐Ÿ”„ State Management (Optional)

Current Approach: Parent-Driven State

Architecture:

jtQueryViewer (Parent)
  โ”œโ”€ State: selectedConfig, parameters, results
  โ”œโ”€ Passes props to children
  โ””โ”€ Children emit events back

Why This Works:

State Management Components (REMOVED)

Components: queryState, settingsState - Deleted December 2025

Status: Never used in production, removed during code cleanup.

Current Approach:

When to Avoid:


๐Ÿ› Error Handling & Resilience

Error Boundaries (LWC)

Implementation:

// jtQueryViewer.js
errorCallback(error, stack) {
    console.error('Component Error:', error);
    console.error('Stack:', stack);

    // Show user-friendly message
    this.showToast('Warning',
        'A component failed to load. Other features remain functional.',
        'warning'
    );

    // Continue execution - don't crash entire app
}

Benefits:

Microservices Pattern (Apex)

See: MICROSERVICES_PATTERN.md

Key Principle: Independent services that fail independently

Example - JT_UsageFinder:

// Service 1: Apex search (always works)
ServiceResponse apexResponse = findInApexClasses(configName);

// Service 2: Flow search (may fail due to Tooling API)
ServiceResponse flowResponse = findInFlows(configName);

// Return both, even if one failed
return new AggregatedResponse(apexResponse, flowResponse);

UI Handling:


๐Ÿ“ฑ Responsive Design

Breakpoints

Breakpoint Width Layout
Mobile < 768px Expandable cards, stacked inputs
Tablet 768px - 1024px Hybrid (some cards, some tables)
Desktop > 1024px Full tables, side-by-side layout

Mobile-Specific Features

Query Results:

Forms:

Modals:


๐Ÿงช Testing Strategy

E2E Tests (Playwright)

Test Categories:

  1. Component Loading (3 tests)
  2. User Interactions (8 tests)
  3. Data Operations (5 tests)
  4. Accessibility (4 tests)
  5. Responsive Design (2 tests)
  6. i18n (2 tests)
  7. Component Integration (4 tests)

Key Features:

Apex Unit Tests

Coverage by Class: | Class | Coverage | Tests | |โ€”โ€”-|โ€”โ€”โ€”-|โ€”โ€”-| | JT_DataSelector | 95% | 12 methods | | JT_UsageFinder | 92% | 8 methods | | JT_MetadataCreator | 88% | 6 methods | | JT_QueryViewerController | 91% | 10 methods | | JT_RunAsTestExecutor | 89% | 5 methods | | JT_ProductionSettingsController | 90% | 7 methods |

Overall: 84.5% average coverage


๐Ÿ“š Documentation

Available Guides

Document Language Topic
README.md EN Overview, quick start, features
ARCHITECTURE.md EN System design, patterns, performance
CHANGELOG.md EN Version history, breaking changes
TOOLING_API_SETUP.md EN Step-by-step Tooling API setup
TOOLING_API_SETUP_ES.md ES Guรญa de configuraciรณn Tooling API
SEARCHABLE_COMBOBOX_USAGE.md EN Component API reference
MICROSERVICES_PATTERN.md EN Resilient architecture
TRANSLATIONS_ARCHITECTURE.md EN i18n implementation
ACCESSIBILITY.md EN WCAG 2.1 compliance details

In-App Documentation

Accessible via Documentation tab, includes:


๐Ÿš€ Future Enhancements (v2.1+)

Planned Features

  1. GitHub Actions CI/CD
    • Automated E2E tests on PR
    • Jekyll GitHub Pages for documentation
    • Test result videos
  2. Reports & Dashboards
    • Report Type over custom metadata
    • Dashboard showing most-used configurations
    • API consumption analytics
  3. Bulk Operations
    • Multi-select configurations
    • Batch execution
    • Results comparison
  4. Export/Import
    • Export configurations to JSON
    • Import from other orgs
    • Version control integration
  5. Advanced Search
    • Full-text search in configurations
    • Search by object name
    • Search by query content
  6. More Languages
    • Korean
    • Dutch
    • Russian
    • Arabic (RTL support)

๐Ÿ“ž Support & Contributing

Need Help?

Want to Contribute?


Version: 2.0.0 Last Updated: 2025-11-30 License: MIT