Skip to content

2026-06-16 Update#86

Merged
dvir001 merged 2 commits into
mainfrom
2026-06-16-Update
Jun 17, 2026
Merged

2026-06-16 Update#86
dvir001 merged 2 commits into
mainfrom
2026-06-16-Update

Conversation

@dvir001

@dvir001 dvir001 commented Jun 16, 2026

Copy link
Copy Markdown
Owner

Add data-quality (dirty data) and missing-hire-date reports with JSON caches and XLSX export support. Probe Graph API capabilities by decoding JWT roles (probe_graph_capabilities) and persist graph_capabilities.json; remove stale capabilities on startup. Enhance msgraph to detect Exchange mailboxes via assignedPlans, read/showInAddressList for GAL visibility, include state in records, and enrich last-login records with manager info so filters work correctly. Wire new filters and tagpicker state through reports, add mailbox/GAL/manager toggles to multiple report functions, and expose /api/graph-capabilities and /api/clear-data endpoints (clear caches and kick off a fresh sync). Update config to include new cache file paths and adjust repository dir location.

Add data-quality (dirty data) and missing-hire-date reports with JSON caches and XLSX export support. Probe Graph API capabilities by decoding JWT roles (probe_graph_capabilities) and persist graph_capabilities.json; remove stale capabilities on startup. Enhance msgraph to detect Exchange mailboxes via assignedPlans, read/showInAddressList for GAL visibility, include state in records, and enrich last-login records with manager info so filters work correctly. Wire new filters and tagpicker state through reports, add mailbox/GAL/manager toggles to multiple report functions, and expose /api/graph-capabilities and /api/clear-data endpoints (clear caches and kick off a fresh sync). Update config to include new cache file paths and adjust repository dir location.
Copilot AI review requested due to automatic review settings June 16, 2026 11:39
Comment thread simple_org_chart/msgraph.py Fixed
Comment thread simple_org_chart/reports.py Fixed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands the admin reporting and sync workflow in SimpleOrgChart by adding data-quality and missing-hire-date reports, introducing Graph-permission capability probing to gate certain UI filters, and adding a “clear cached data & resync” management action.

Changes:

  • Added new reports (missing hire date, dirty data) backed by JSON caches and XLSX export endpoints, plus UI selector/options and i18n strings.
  • Added Graph capability probing + /api/graph-capabilities and used it to gate report filters that require specific Graph permissions (MailboxSettings.Read, AuditLog.Read.All).
  • Enhanced Graph-derived employee metadata (mailbox presence/type, GAL visibility, state, manager presence) and wired new toggle/tagpicker filters through the reports pipeline.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
templates/reports.html Adds report selector options for the new reports.
templates/configure.html Adds “Data Management” section with a clear-data action button.
static/reports.js Adds report configs, new filters/tagpickers, capability gating, sync polling, and table rendering updates.
static/reports.css Adds disabled button styling and compact filter group layout/unavailable chip styling.
static/locales/en-US.json Adds i18n strings for new reports, filters, and UI messages.
static/configure.js Implements the clear-data action (confirm → POST → start polling).
static/app.js Improves click handling during drag and disables the sync button while syncing.
simple_org_chart/user_scanner_service.py Updates repo install path documentation to data/repositories/....
simple_org_chart/reports.py Adds new filter parameters, state tagpicker support, and dirty-data detection/filter helpers.
simple_org_chart/msgraph.py Adds JWT-role capability probe helpers and enriches user records with mailbox/GAL/manager/state metadata.
simple_org_chart/hierarchy.py Adds state into flattened traversal output.
simple_org_chart/data_update.py Writes new caches (capabilities, dirty data, missing hire date) and enriches last-login records with manager info.
simple_org_chart/config.py Moves REPO_DIR under data/ and adds new cache path constants.
simple_org_chart/app_main.py Adds new report routes/exports, new parsing for state + new toggles, /api/graph-capabilities, and /api/clear-data.
README.md Updates feature list, permissions notes, and cache documentation.
AGENTS.md Documents architecture and filter/capability wiring (needs a small correction).

Comment thread static/reports.js
Comment on lines +180 to +184
{
key: 'issues',
labelKey: 'reports.types.dirtyData.columns.issueDetail',
render: (record) => {
const issues = record.issues || [];
Comment thread AGENTS.md
Comment on lines +98 to +101
**How it works:**
- `msgraph.probe_graph_capabilities(token)` runs 4 targeted API calls at the start of every sync and writes `data/graph_capabilities.json`.
- `GET /api/graph-capabilities` serves that file to the front end.
- `reports.js` fetches capabilities before first render; `_isFilterCapable(filter)` checks `filter.requiredCapability` against the loaded flags.
Comment thread static/reports.js
Comment thread static/reports.js
Comment on lines +57 to +60
payload = parts[1]
# Restore base64 padding
payload += '=' * (4 - len(payload) % 4)
decoded = base64.urlsafe_b64decode(payload.encode())
Comment on lines +254 to +258
include_hidden_from_address_list: bool = True,
include_visible_in_address_list: bool = True,
include_with_mailbox: bool = True,
include_without_mailbox: bool = True,
include_with_manager: bool = True,
Comment thread static/reports.js
Comment on lines +625 to +629
if (!isCapable) {
button.className = `filter-chip filter-chip--unavailable`;
button.disabled = true;
button.title = t('reports.filters.missingCapability');
} else {
Comment thread static/reports.js
Comment thread static/reports.js
@dvir001 dvir001 merged commit eaf72c4 into main Jun 17, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants