FlowFuse / FlowFuse/flowfuse

Track audit source on snapshots

Open
#7,993 0 comments 0 reactions 0 assignees View on GitHub
task
Dominant language
JavaScript
Stars
400
Forks
89
Avg merge
1d 21h
Merged PRs (30d)
146

Description

### Description

Snapshots track *who* created them (`UserId` FK) but not *how* (UI, API, MCP, Expert). The snapshot list views on both the instance and application pages have no way to show this, unlike the audit log which already distinguishes these sources.

The `source` value is available in the request context at creation time (set up by `resolveSourceContext` in the auth flow), but it's never passed through to the snapshot record.

- Add a nullable `source` STRING column to the `ProjectSnapshots` table (same semantics as `AuditLog.source`: `null` = UI, `'api'`, `'mcp'`, `'mcp:expert'`)
- In `pages/instance/VersionHistory/Snapshots/index.vue` and `pages/application/Snapshots.vue`, show a source icon + tooltip inline with the "Created By" UserCell (same pattern as `AuditEntry.vue`: SparklesIcon for mcp/mcp:expert, CommandLineIcon for api)

### Epic/Story

https://github.com/FlowFuse/flowfuse/issues/7425

### Have you provided an initial effort estimate for this issue?

I have provided an initial effort estimate

Contributor guide

Open the contributing guide

Research direction

Start by tracing source handling from resolveSourceContext in the auth flow to snapshot creation, and compare the existing AuditLog.source semantics. Then inspect the ProjectSnapshots table and the two named snapshot views, using AuditEntry.vue as the UI pattern. Done means nullable source data is retained and both views show the appropriate icon and tooltip beside Created By.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend, database, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.