Tech Stack Research
In my second week of working on ChatCraft, I did some research on two technologies used by ChatCraft, Chakra UI and Mermaid JS. I compiled my findings into wiki pages as well as a PowerPoint, which I presented to the team during our weekly progress meeting. See my powerpoint here.
Chakra UI
ChakraUI is a React UI component library and framework, known for its easily customizable components. See the wiki here.
Mermaid JS
Mermaid JS is a JavaScript library which allows you to write code that translates into diagrams and flowcharts. See the wiki here.
Troubleshooting sops
Following up from my last blog, I was able to get an OpenAI key using sops. However, the OpenAI key I got from sops did not work. I contacted other team members, who also said that the key stopped working for them, although it worked for them last week. After posting on our team discord, the project admin was able to confirm and fix the problem.
I also faced an issue with the commands in the README.sops.md file not working for me. I spoke with other team members who also told me those instructions did not work for them as well.
I was able to find two alternative solutions with the help of my team members.
Solution 1:
./scripts/sops_age_key.sh
export SOPS_AGE_KEY=<PASTE_KEY_RECEIVED_FROM_LAST_COMMAND>
sops -d sops/keys.enc.yaml
Solution 2:
read -s SSH_TO_AGE_PASSPHRASE; export SSH_TO_AGE_PASSPHRASE
# Type passphrase then press [Enter]
export SOPS_AGE_KEY=$(ssh-to-age -private-key < ~/.ssh/id_ed25519)
sops -d sops/keys.enc.yaml
The second set of commands in the the README.sops.md which was meant for users who have passphrases set, worked for me as long as I entered an empty passphrase and hit [Enter]
.
Pull Request
I created an issue and PR to remove the non-functioning commands from README.sops.md, which was merged.
Issues
I signed up to work on this issue. Currently, ChatCraft allows users to switch between two providers, OpenAI and OpenRouter, however it only stores the API key of one provider. That means when we switch to a different provider, the old key is cleared from storage. This clearing of the key was something I worked on in a past PR. If we change the code to allow for the storage of multiple providers, users could toggle between the two without having to re-input the API key.
Code Reviews
I did a code review of PR#328, which was a simple documentation fix. I tested and approved the PR.
I did a code review of PR#342. I scheduled a call with Amnish to make sure I tested everything that is meant to be tested and to show him the issues I encountered. I added comments and requested changes on the PR.
Troubleshooting with Team Members
I helped Rachit troubleshoot a problem he was facing with a blank screen coming up when he ran pnpm dev
.
We tried fetching the latest code and I asked him to try running the following commands to get his branch up to date with main. (Found from this StackOverflow post). This fixed the blank screen issue. I believe the problem was he was not using the correct commands to get his branch up to date with main.
To fetch the latest code: (Only use this if all your code is pushed to GitHub or you may risk losing work)
git fetch --all
git reset --hard origin/main
If your branch is behind of main then do:
git checkout main (you are switching your branch to main)
git pull
git checkout yourBranch (switch back to your branch)
git merge main
Top comments (0)