Skip to content

feat(apps): consolidate Apps workspace and navigation experience - #471

Merged
esafwan merged 13 commits into
developfrom
consolidation/apps-workspace-navigation
Jul 26, 2026
Merged

feat(apps): consolidate Apps workspace and navigation experience#471
esafwan merged 13 commits into
developfrom
consolidation/apps-workspace-navigation

Conversation

@esafwan

@esafwan esafwan commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Consolidates the shared navigation-surface work from:

Hub #243 and Chat/PWA #260/#261 are intentionally excluded.

Included Scope

Apps registry and workspace launcher (#432)

  • Adds the HUF App DocType registry with manifest/provenance/sync fields.
  • Adds manifest discovery through huf/apps/*.json in installed provider apps.
  • Validates app IDs, local routes/icons, manifest versions, unknown fields, and permission methods.
  • Adds sync lifecycle handling: hash-skip upserts, duplicate app ID protection, orphan cleanup, uninstall hook, after-migrate sync, and manual sync API.
  • Adds safe launcher APIs in huf.ai.apps_api: get_huf_apps, get_huf_app, and System Manager-only sync_huf_apps.
  • Adds /huf/apps launcher UI with loading/error/empty states, filters/help, launch controls, and permission-gated Apps nav entry.
  • Adds app-table surfacing in the data table page via AppTablesSection.
  • Preserves app registry manifest/discovery/permission docs in the PR body lineage and source commits.
  • Preserves provider-app UI assets: huf/public/css/huf-tokens.css and huf/public/js/huf-app-badge.js.

Navigation taxonomy (#433)

  • Reworks sidebar into Dashboard, Use, Build, Know, Operate, and Settings surfaces.
  • Keeps Apps under Use because it is the end-user launcher surface.
  • Moves data/knowledge surfaces to Know: Tables (/data) and Sources (/knowledge).
  • Keeps Operate as Chat, Executions, and Artifacts.
  • Moves Users into Settings and keeps Settings as the only collapsible group.
  • Adds NavCollapsibleGroup for expanded accordion behavior and collapsed-rail flyout behavior.
  • Preserves navigation design screenshots:
    • docs/pr-assets/sidebar-nav-v2/sidebar-expanded-know-group.png
    • docs/pr-assets/sidebar-nav-v2/sidebar-collapsed-rail-flyout.png

Consolidation fixes

  • Resolved frontend/src/components/app-sidebar.tsx by combining the Apps Use entry with the newer navigation taxonomy and reusable Settings flyout.
  • Resolved frontend/src/pages/DataPage.tsx by preserving grouped data-table UX, adding AppTablesSection, and restoring agent-access modal state/count loading.
  • Added narrow TypeScript compile fixes in existing data-table access/file-upload code so this develop-based umbrella branch is locally buildable.

Validation

Local checks run on consolidation/apps-workspace-navigation:

  • python3 -m py_compile huf/ai/app_seeding/apps_loader.py huf/ai/app_seeding/seeder.py huf/ai/apps_api.py huf/huf/doctype/huf_app/huf_app.py huf/install.py huf/ai/app_seeding/tests/test_apps_sync.py — pass.
  • npm run typecheck from frontend/ — pass.
  • npm run build from frontend/ — pass.

Notes:

  • npm ci was required because this fresh worktree had no node_modules.
  • Build emitted existing Tailwind darkMode and large chunk warnings, but completed successfully.
  • npm ci reported dependency audit findings already present in the dependency graph; no tracked dependency files changed.

Source PR Handling

Do not merge this umbrella PR into develop or close #432/#433 until parent approval is explicit.

esafwan added 13 commits July 26, 2026 23:37
…ware API

Implements the backend of the HUF Apps MVP (Tracks/HufApp/HUF_APPS_MVP.md):

- New 'HUF App' DocType: synchronized registry record with provenance
  (source_app/source_file), manifest_hash drift detection, sync_status,
  sync_error. System Manager only; ordinary users go through guarded APIs.
- Discovery: extends app_seeding LOAD_ORDER with ('apps', upsert_huf_app)
  loading last; scans flat *.json under provider app's huf/apps/ dir.
- Validation: manifest_version, app_id grammar, site-local route/icon rules
  (rejects external/protocol-relative/data URLs), launch_mode, unknown
  top-level fields rejected, permission_method resolves to callable in an
  installed app, provenance fields never trusted from JSON.
- Sync lifecycle: hash-skip upserts, per-provider-app commit isolation,
  duplicate app_id collision protection (no silent overwrite), orphan
  cleanup deletes removed/uninstalled registrations, after_app_uninstall
  hook, after_migrate sync.
- APIs (huf.ai.apps_api): get_huf_apps / get_huf_app (permission-filtered,
  safe fields only) and sync_huf_apps (System Manager). Visibility via
  huf.permissions.has_capability(user, 'agent.use') or permission_method.
- Tests: 12 tests covering valid/invalid/duplicate/removed manifests and
  permission filtering.
- AppsPage: card grid of permitted HUF Apps (icon, title, description,
  category) with loading skeleton, error+retry, and empty states.
- Cards navigate full-page to the registered site-local route
  (window.location.assign, site-local guard); no iframe/microfrontend.
- appsApi service wrapping huf.ai.apps_api.get_huf_apps.
- 'Apps' entry in a new 'Use' sidebar group above the 'Build' group,
  gated on the agent.use capability.
Self-contained /assets/huf/js/huf-app-badge.js any HUF App can include
with one script tag: subtle fixed pill linking back to /huf/apps,
overridable via data-position/label/href/new-tab/theme, no deps.
Cards are <a href> now (cmd/middle-click opens new tab natively), with
a subtle ExternalLink icon button per card; site-local route guard kept.
- set_huf_app_enabled (System Manager): admin disable/enable; sync
  preserves manual disable (manifest enabled applies only on insert).
- exposed_tables manifest field: provider DocTypes opt-in for HUF
  visibility, validated (exists + owned by provider module), stored
  read-only, exposed via get_huf_app detail + SM list.
- Categories: 8 documented defaults + free-form custom (<=30 chars,
  no HTML); non-standard categories noted at sync, never rejected.
- enabled/exposed_tables only exposed to System Managers in APIs.
- 11 new tests covering all rules.
CSS vars extracted from the design system (paper/ink/steel/signal,
2px radii, IBM Plex fonts) + scoped base classes (.huf-card/.huf-btn/
.huf-badge/.huf-input/...). Apps opt in with one <link>; light-only
per the design system.
… tables

- Help '?' in the Apps header opens a modal explaining what HUF Apps
  are, where they come from, and why the list is permission-filtered.
- Search + category chips appear only at >=8 installed apps; chips
  from the 8 defaults plus any custom categories present.
- System-Manager overflow action to disable/enable apps (driven by
  the SM-only enabled field); disabled cards greyed, badged, blocked.
- /huf/data gains an App Tables section linking provider-exposed
  DocTypes to their desk lists.
Backend returns exposed_tables as a list; the service accepted only a
comma-joined string. Tokens asset gains --huf-on-accent for text placed
on accent backgrounds.
…sers under Settings

Takes the interaction idea from PR #283 (single-open accordion + collapsed-rail
flyout popovers) and applies it to develop's Build/Operate grouping instead of
the old UI structure:

- Build: Agents, Agent Prompts, Flows (Data/Knowledge moved out)
- Knowledge (new collapsible group): Tables (/data), Documents (/knowledge)
- Operate: Chat, Executions, Artifacts (unchanged)
- Settings (collapsible): existing items + Users (People group removed;
  user management is an admin task, not a daily destination)
- New NavCollapsibleGroup component: accordion section when expanded,
  DropdownMenu flyout when the rail is collapsed; active route auto-opens
  its group; capability gating preserved per item
…s to Sources

- KNOW is now a flat label group (Tables, Sources) matching Build/Operate —
  always visible, no expand click; only Settings stays collapsible
- 'Documents' renamed to 'Sources': it is any vector/FTS-backed retrieval
  store (Chroma, sqlite-vec, pgvector), and the name scales to future source
  types (Files, Repos, Drives) nesting under KNOW
@esafwan
esafwan force-pushed the consolidation/apps-workspace-navigation branch from afd1cbe to 1b36781 Compare July 26, 2026 19:39
@esafwan
esafwan merged commit 3dc62d9 into develop Jul 26, 2026
4 checks passed
@esafwan esafwan changed the title feat(apps): registry, workspace launcher, and navigation taxonomy feat(apps): consolidate Apps workspace and navigation experience Jul 26, 2026
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.

1 participant