Skip to content

proof of concept: vibe coded multi profile - #140

Draft
deadbaed wants to merge 3 commits into
viktorstrate:mainfrom
deadbaed:multi-profile
Draft

deadbaed wants to merge 3 commits into
viktorstrate:mainfrom
deadbaed:multi-profile

Conversation

@deadbaed

Copy link
Copy Markdown
Contributor

This was vibe coded in order to test the output of #134, related to #133.

I asked the LLM to be able to launch a new instance of the app, but with a blank profile, and that it cannot mess up the main profile (which I use daily).

Treat this code as "I wanted to test something quickly, the code is garbage but might get the discussion going / ideas flowing".

I do not write swift so I cannot juge the quality.

This PR is not intended to be merged, putting it as draft.

Build and usage

xcodebuild -project Mactrix.xcodeproj -scheme Mactrix -destination 'platform=macOS' build

To launch with a new profile run (if the profile does not exist, it will be created)

~/Library/Developer/Xcode/DerivedData/.../Mactrix.app/Contents/MacOS/Mactrix --profile test-server
$ ./Mactrix --help
Usage: Mactrix [options]

Options:
  --profile <name>           Launch with the named profile (created if missing).
  --list-profiles            List all known profiles and exit.
  --delete-profile <name>    Delete a named profile's data, cache, and keychain items.
  --help, -h                 Show this message and exit.

Environment:
  MACTRIX_PROFILE=<name>     Equivalent to --profile <name>.

Without --profile, Mactrix uses the main profile and today's legacy storage paths.
$ ./Mactrix --list-profiles
default (main profile)
test-server     createdAt: 2026-11-20T11:15:27Z

Result

I was able to test #134 which is what I wanted :)

Screenshot 2026-11-20 at 12 16 56 Screenshot 2026-11-20 at 12 17 35

- Profile name validation, legacy + scoped path layout, ensureExists/list/delete
- CLI and MACTRIX_PROFILE env parsing
- ActiveProfile.current holder defaults to main profile

Assisted-by: pi-coding-agent kimi-k2.7-code
- AppKeychain defaults to ActiveProfile.current.keychainService
- MatrixClient uses profile-scoped data/cache paths
- Create directories for named profiles before Rust SDK init
- Scope reset() to active profile

Assisted-by: pi-coding agent kimi-k2.7-code
- Add LaunchProfileHandler to parse args and perform management actions
- App entry point exits before GUI for management commands

Assisted-by: pi-coding-agent kimi-k2.7-code
@deadbaed deadbaed mentioned this pull request Nov 20, 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