Skip to content

Feat: Add Function Edit Page with TreeView file browser and CodeEditor.#16

Merged
twoGiants merged 1 commit into
masterfrom
016-feat-function-edit-page
Apr 30, 2026
Merged

Feat: Add Function Edit Page with TreeView file browser and CodeEditor.#16
twoGiants merged 1 commit into
masterfrom
016-feat-function-edit-page

Conversation

@twoGiants
Copy link
Copy Markdown
Collaborator

@twoGiants twoGiants commented Apr 23, 2026

Changes

  • 🎁 Add Function Edit Page with TreeView file browser and SDK CodeEditor for editing function source code
  • 🎁 FileTreeView component with loading state, empty state, dirty indicators, and directories-before-files sorting
  • 🎁 Add fetch() and updateRepo() to SourceControlService for full repo tree retrieval and pushing changes
  • 🎁 updateRepo caches commit SHA locally to handle GitHub's eventually consistent ref storage on rapid saves
  • 🎁 Success alert after save with auto-dismiss, unsaved changes confirmation modal on navigation
  • 🎁 Auto-select handler file based on runtime from func.yaml
  • 🎁 Empty state with code icon when no file is selected
  • 🧹 Migrate test runner from Jest to Vitest with MSW 2.x for GitHub API mocking
  • 🧹 Merge RepoInfo and SourceRepo into single RepoMetadata type
  • 🧹 Extract parseNamespaceAndRuntime, getLanguageFromPath, handlerMap into shared utils
  • 🧹 Add CSP connect-src for GitHub API in dev mode (start-console.sh)
  • 🧹 Add CSS, co-location, and React performance rules to style guide and architecture docs
  • 🧹 Add draft PR step and communication rules to workflow docs

@twoGiants twoGiants force-pushed the 016-feat-function-edit-page branch 10 times, most recently from a6e3c0b to 511760f Compare April 25, 2026 10:08
@twoGiants twoGiants requested a review from matejvasek April 27, 2026 15:34
@twoGiants twoGiants force-pushed the 016-feat-function-edit-page branch 2 times, most recently from c78830f to c191a11 Compare April 29, 2026 16:15
@twoGiants twoGiants marked this pull request as ready for review April 29, 2026 16:16
@matejvasek
Copy link
Copy Markdown
Collaborator

  1. atob corrupts non-ASCII content (GithubService.ts, fetch method)
    atob(file.content) decodes base64 to a Latin-1 string. Any UTF-8 multi-byte characters (accented letters, CJK, emoji) in source files will be silently corrupted. The browser-correct approach is: new TextDecoder().decode(Uint8Array.from(atob(file.content), c => c.charCodeAt(0)))

I can confirm that unicode does not work "šč" results in "Å¡Ä�".

@twoGiants twoGiants force-pushed the 016-feat-function-edit-page branch 2 times, most recently from 4575097 to ee686e1 Compare April 30, 2026 10:14
File tree browser and code editor for viewing and editing
function source code on GitHub. Files load from the Git Data
API, the handler file is auto-selected based on func.yaml
runtime. Save & Deploy pushes changes back via updateRepo,
which caches the last commit SHA to handle GitHub's eventually
consistent ref storage.

Migrate test runner from Jest to Vitest with MSW 2.x for
GitHub API mocking. Merge RepoInfo and SourceRepo into single
RepoMetadata type. Extract shared utils (parseNamespaceAndRuntime,
getLanguageFromPath, handlerMap). Add CSP connect-src for
GitHub API in dev mode.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Stanislav Jakuschevskij <sjakusch@redhat.com>
@twoGiants twoGiants force-pushed the 016-feat-function-edit-page branch from ee686e1 to e1cb3f2 Compare April 30, 2026 10:23
@twoGiants twoGiants merged commit 4034d3c into master Apr 30, 2026
4 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.

2 participants