Skip to content

Fix workspace file list not refreshed when git status is empty - #158

Open
qiangxue1206 wants to merge 1 commit into
andreax79:mainfrom
qiangxue1206:fix/workspace-refresh-empty-status
Open

qiangxue1206 wants to merge 1 commit into
andreax79:mainfrom
qiangxue1206:fix/workspace-refresh-empty-status

Conversation

@qiangxue1206

Copy link
Copy Markdown

What

WorkspaceFiles.vue#refresh() ignored an empty git status --porcelain result
(if (data) { this.parseStatus(data) }). A clean working tree produces an empty
string, so the file list kept stale entries right after any operation that makes
the tree clean — commit, revert, and push.

Symptom: after a successful commit the just-committed files stay in the list, so
it looks like the commit failed; only a full page reload (F5) fixes the display.

Fix

Apply the result unconditionally:

this.parseStatus(data || '');

parseStatus('') yields an empty item list, so both panels are correctly cleared.

Notes

  • Secondary case: after a commit, showCommitDialog() calls the local
    this.refresh() instead of this.$emit('refresh') (used by revert()), so the
    sibling panel isn't refreshed either. The if (data) guard is the primary
    cause, but $emit('refresh') there would keep both panels consistent.
  • Reproduced with 8.3.1 on Airflow 3.3.2 (FAB auth manager, Docker Compose).
  • Not built locally; relying on CI for the build/test check.

This branch has not been deployed

No deployments
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