Place the navy beans in a bowl and cover them with 3 cups water. Allow them to sit overnight, or for 8 hours. Drain them, rinse them, and set them aside.
Heat the olive oil over medium heat in a large, heavy bottomed pot or a Dutch oven. Add the onions and sprinkle them with salt. Saute the onions for 7-8 minutes or until they're very soft and clear. Add the celery and continue cooking until the celery is soft, about 3 minutes. Add the garlic and cook for one more minute.
Add the navy beans and the bay leaf, along with enough water to cover the beans by 1 inch. Cover the pot and reduce the heat to a simmer. Simmer until the beans are tender but not mushy (this should take 45-75 minutes). Check the beans starting at the 45 minute mark, and if they're not ready, check them every ten minutes until they're tender.
Remove the bay leaf. Add the pasta, tomatoes, thyme, salt, and pepper to the soup. Add 1 1/2 cups additional water, or more/less as needed (depending on how soupy or stew-like you want the pasta to be; it will thicken considerably as the pasta cooks). Cook, stirring every couple of minutes, until the pasta is cooked al dente (about 8 minutes). Stir in the baby spinach and cover the soup for a few moments to allow the spinach to wilt. Keep stirring until the spinach is tender and cooked into the soup.
Taste soup to adjust seasoning and add water as needed. If you like, stir in herbs or basil. Serve soup with a small drizzle of olive oil if desired, or with crackers or a hunk of crusty bread. Soup will keep in the fridge, covered, for up to five days, and can be frozen for up to a month.